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

Allow non-occupant non-subscribed service admin send private MUC message (#3474)

This commit is contained in:
Badlop 2021-01-08 20:30:15 +01:00
parent e1a79ba1b0
commit b6d90cc55c

View File

@ -531,7 +531,8 @@ normal_state({route, ToNick,
continue_delivery ->
case {(StateData#state.config)#config.allow_private_messages,
is_user_online(From, StateData) orelse
is_subscriber(From, StateData)} of
is_subscriber(From, StateData) orelse
is_user_allowed_message_nonparticipant(From, StateData)} of
{true, true} when Type == groupchat ->
ErrText = ?T("It is not allowed to send private messages "
"of type \"groupchat\""),
@ -1192,7 +1193,7 @@ get_participant_data(From, StateData) ->
#subscriber{nick = FromNick} ->
{FromNick, none}
catch _:{badkey, _} ->
{<<"">>, moderator}
{From#jid.luser, moderator}
end
end.