From: Badlop Date: Thu, 20 Oct 2016 18:34:48 +0000 (+0200) Subject: If a participant can change subject, let asubscriber too (#1345) X-Git-Tag: 16.12~25^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0212559ca7c3bdf922d06504c3986cbaa06a2671;p=ejabberd If a participant can change subject, let asubscriber too (#1345) --- diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index 5bee4f0b7..6010e0bbf 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -959,6 +959,7 @@ process_groupchat_message(From, _ -> case can_change_subject(Role, + IsSubscriber, StateData) of true -> @@ -2821,10 +2822,10 @@ check_subject(Packet) -> SubjEl -> fxml:get_tag_cdata(SubjEl) end. -can_change_subject(Role, StateData) -> +can_change_subject(Role, IsSubscriber, StateData) -> case (StateData#state.config)#config.allow_change_subj of - true -> Role == moderator orelse Role == participant; + true -> Role == moderator orelse Role == participant orelse IsSubscriber == true; _ -> Role == moderator end.