mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
Subscriber should not send message to moderated room (#3222)
This commit is contained in:
parent
ec5f369d9d
commit
61926a44be
@ -935,7 +935,8 @@ process_groupchat_message(#message{from = From, lang = Lang} = Packet, StateData
|
|||||||
of
|
of
|
||||||
true ->
|
true ->
|
||||||
{FromNick, Role} = get_participant_data(From, StateData),
|
{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) ->
|
((StateData#state.config)#config.moderated == false) ->
|
||||||
Subject = check_subject(Packet),
|
Subject = check_subject(Packet),
|
||||||
{NewStateData1, IsAllowed} = case Subject of
|
{NewStateData1, IsAllowed} = case Subject of
|
||||||
|
Loading…
Reference in New Issue
Block a user