mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01: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;
|
||||
<<"headline">> -> ok;
|
||||
_ ->
|
||||
Err =
|
||||
jlib:make_error_reply(Packet,
|
||||
?ERR_SERVICE_UNAVAILABLE),
|
||||
ejabberd_router:route(To, From,
|
||||
Err)
|
||||
case fxml:get_subtag_with_xmlns(Packet,
|
||||
<<"x">>,
|
||||
?NS_MUC_USER)
|
||||
of
|
||||
false ->
|
||||
Err =
|
||||
jlib:make_error_reply(Packet,
|
||||
?ERR_SERVICE_UNAVAILABLE),
|
||||
ejabberd_router:route(To, From,
|
||||
Err);
|
||||
_ -> ok
|
||||
end
|
||||
end,
|
||||
{false, Attrs, StateData}
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user