mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
Don't return error for blocked MUC PMs
If a message stanza is blocked as per XEP-0016 or XEP-0191 and the stanza is marked as a private MUC message, don't return an error. This makes sure users won't be kicked from MUC rooms when blocking other participants.
This commit is contained in:
parent
d4d1941133
commit
4b0d71d402
@ -1632,11 +1632,18 @@ handle_info({route, From, To,
|
|||||||
<<"groupchat">> -> ok;
|
<<"groupchat">> -> ok;
|
||||||
<<"headline">> -> ok;
|
<<"headline">> -> ok;
|
||||||
_ ->
|
_ ->
|
||||||
Err =
|
case fxml:get_subtag_with_xmlns(Packet,
|
||||||
jlib:make_error_reply(Packet,
|
<<"x">>,
|
||||||
?ERR_SERVICE_UNAVAILABLE),
|
?NS_MUC_USER)
|
||||||
ejabberd_router:route(To, From,
|
of
|
||||||
Err)
|
false ->
|
||||||
|
Err =
|
||||||
|
jlib:make_error_reply(Packet,
|
||||||
|
?ERR_SERVICE_UNAVAILABLE),
|
||||||
|
ejabberd_router:route(To, From,
|
||||||
|
Err);
|
||||||
|
_ -> ok
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
{false, Attrs, StateData}
|
{false, Attrs, StateData}
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user