From b6d90cc55cc02e63b0087d9cad1490685e51ea34 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 8 Jan 2021 20:30:15 +0100 Subject: [PATCH] Allow non-occupant non-subscribed service admin send private MUC message (#3474) --- src/mod_muc_room.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 9e633a604..036a0ce1e 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -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.