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

Subscriber should not send message to moderated room (#3222)

This commit is contained in:
Badlop 2020-04-15 13:13:10 +02:00
parent ec5f369d9d
commit 61926a44be

View File

@ -935,7 +935,8 @@ process_groupchat_message(#message{from = From, lang = Lang} = Packet, StateData
of
true ->
{FromNick, Role} = get_participant_data(From, StateData),
if (Role == moderator) or (Role == participant) or IsSubscriber or
if (Role == moderator) or (Role == participant) or
(IsSubscriber andalso ((StateData#state.config)#config.members_by_default == true)) or
((StateData#state.config)#config.moderated == false) ->
Subject = check_subject(Packet),
{NewStateData1, IsAllowed} = case Subject of