25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Implement basic voice request processing logic.

No rate control or configuration for now
This commit is contained in:
Maxim Ignatenko 2011-07-25 19:54:45 +03:00
parent 8dd6f128bf
commit 18dd0d08cb

View File

@ -298,7 +298,16 @@ normal_state({route, From, "",
end
end;
IsVoiceRequest ->
send_voice_request(From, StateData),
case is_visitor(From, StateData) of
true ->
send_voice_request(From, StateData);
_ ->
ErrText = "Only visitors allowed to request voice",
Err = jlib:make_error_reply(
Packet, ?ERRT_NOT_ALLOWED(Lang, ErrText)),
ejabberd_router:route(
StateData#state.jid, From, Err)
end,
{next_state, normal_state, StateData};
IsVoiceApprovement ->
{next_state, normal_state, StateData};