Merge pull request #3004 from Slawutich/master

Custom exit message is not broadcast
This commit is contained in:
badlop 2019-08-26 13:53:42 +02:00 committed by GitHub
commit e14f206615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2418,7 +2418,8 @@ send_new_presence(NJID, Reason, IsInitialPresence, StateData, OldStateData) ->
last_presence = Presence0} = UserInfo =
maps:get(jid:tolower(LJID), StateData#state.users),
{Role1, Presence1} =
case presence_broadcast_allowed(NJID, StateData) of
case (presence_broadcast_allowed(NJID, StateData) orelse
presence_broadcast_allowed(NJID, OldStateData)) of
true -> {Role0, Presence0};
false -> {none, #presence{type = unavailable}}
end,