mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +01:00
Apply default role after revoking admin affiliation (#3023)
This commit is contained in:
parent
d8433d1644
commit
fd4c5edc23
@ -2916,9 +2916,13 @@ process_item_change(Item, SD, UJID) ->
|
||||
set_role(JID, none, SD1);
|
||||
_ ->
|
||||
SD1 = set_affiliation(JID, none, SD),
|
||||
send_update_presence(JID, Reason, SD1, SD),
|
||||
maybe_send_affiliation(JID, none, SD1),
|
||||
SD1
|
||||
SD2 = case (SD1#state.config)#config.moderated of
|
||||
true -> set_role(JID, visitor, SD1);
|
||||
false -> set_role(JID, participant, SD1)
|
||||
end,
|
||||
send_update_presence(JID, Reason, SD2, SD),
|
||||
maybe_send_affiliation(JID, none, SD2),
|
||||
SD2
|
||||
end;
|
||||
{JID, affiliation, outcast, Reason} ->
|
||||
send_kickban_presence(UJID, JID, Reason, 301, outcast, SD),
|
||||
|
@ -784,7 +784,7 @@ change_affiliation_master(Config) ->
|
||||
#muc_item{affiliation = Aff} ->
|
||||
ok
|
||||
end
|
||||
end, [{member, participant, available}, {none, participant, available},
|
||||
end, [{member, participant, available}, {none, visitor, available},
|
||||
{admin, moderator, available}, {owner, moderator, available},
|
||||
{outcast, none, unavailable}]),
|
||||
ok = leave(Config),
|
||||
|
Loading…
Reference in New Issue
Block a user