mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
* src/mod_muc/mod_muc_room.erl: Return Forbidden error message
when user sends private message in a room that disallows it (EJAB-595) SVN Revision: 1323
This commit is contained in:
parent
a96cf33df3
commit
ca8c659804
@ -1,7 +1,11 @@
|
|||||||
2008-05-12 Badlop <badlop@process-one.net>
|
2008-05-12 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/mod_muc/mod_muc_room.erl: Return Forbidden error message
|
||||||
|
when user sends private message in a room that disallows
|
||||||
|
it (EJAB-595)
|
||||||
|
|
||||||
* src/web/ejabberd_http.erl (parse_auth): Allow password that
|
* src/web/ejabberd_http.erl (parse_auth): Allow password that
|
||||||
include colon character (EJAB-522)
|
include colon character (EJAB-622)
|
||||||
|
|
||||||
2008-04-30 Christophe Romain <christophe.romain@process-one.net>
|
2008-04-30 Christophe Romain <christophe.romain@process-one.net>
|
||||||
|
|
||||||
|
@ -478,9 +478,9 @@ normal_state({route, From, ToNick,
|
|||||||
forget_message ->
|
forget_message ->
|
||||||
{next_state, normal_state, StateData};
|
{next_state, normal_state, StateData};
|
||||||
continue_delivery ->
|
continue_delivery ->
|
||||||
case (StateData#state.config)#config.allow_private_messages
|
case {(StateData#state.config)#config.allow_private_messages,
|
||||||
andalso is_user_online(From, StateData) of
|
is_user_online(From, StateData)} of
|
||||||
true ->
|
{true, true} ->
|
||||||
case Type of
|
case Type of
|
||||||
"groupchat" ->
|
"groupchat" ->
|
||||||
ErrText = "It is not allowed to send private "
|
ErrText = "It is not allowed to send private "
|
||||||
@ -514,10 +514,19 @@ normal_state({route, From, ToNick,
|
|||||||
ToJID, Packet)
|
ToJID, Packet)
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
_ ->
|
{true, false} ->
|
||||||
ErrText = "Only occupants are allowed to send messages to the conference",
|
ErrText = "Only occupants are allowed to send messages to the conference",
|
||||||
Err = jlib:make_error_reply(
|
Err = jlib:make_error_reply(
|
||||||
Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
|
Packet, ?ERRT_NOT_ACCEPTABLE(Lang, ErrText)),
|
||||||
|
ejabberd_router:route(
|
||||||
|
jlib:jid_replace_resource(
|
||||||
|
StateData#state.jid,
|
||||||
|
ToNick),
|
||||||
|
From, Err);
|
||||||
|
{false, _} ->
|
||||||
|
ErrText = "It is not allowed to send private messages",
|
||||||
|
Err = jlib:make_error_reply(
|
||||||
|
Packet, ?ERRT_FORBIDDEN(Lang, ErrText)),
|
||||||
ejabberd_router:route(
|
ejabberd_router:route(
|
||||||
jlib:jid_replace_resource(
|
jlib:jid_replace_resource(
|
||||||
StateData#state.jid,
|
StateData#state.jid,
|
||||||
|
Loading…
Reference in New Issue
Block a user