aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2016-10-20 20:34:48 +0200
committerBadlop <badlop@process-one.net>2016-10-20 20:35:00 +0200
commit0212559ca7c3bdf922d06504c3986cbaa06a2671 (patch)
treef99dc5d98b468f1443a7666dbe25b7c1002fdcbf /src
parentLet mix be able to cope with configured deps (diff)
If a participant can change subject, let asubscriber too (#1345)
Diffstat (limited to 'src')
-rw-r--r--src/mod_muc_room.erl5
1 files changed, 3 insertions, 2 deletions
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.