25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Merge pull request #2622 from aquarhead/rename-functions

Rename two presence functions
This commit is contained in:
Evgeny Khramtsov 2019-01-27 23:06:21 +03:00 committed by GitHub
commit 23e5b3756c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2149,15 +2149,15 @@ presence_broadcast_allowed(JID, StateData) ->
-spec send_initial_presences_and_messages(
jid(), binary(), presence(), state(), state()) -> ok.
send_initial_presences_and_messages(From, Nick, Presence, NewState, OldState) ->
send_self_presence(From, NewState),
advertise_entity_capabilities(From, NewState),
send_existing_presences(From, NewState),
send_initial_presence(From, NewState, OldState),
send_self_presence(From, NewState, OldState),
History = get_history(Nick, Presence, NewState),
send_history(From, History, NewState),
send_subject(From, OldState).
-spec send_self_presence(jid(), state()) -> ok.
send_self_presence(JID, State) ->
-spec advertise_entity_capabilities(jid(), state()) -> ok.
advertise_entity_capabilities(JID, State) ->
AvatarHash = (State#state.config)#config.vcard_xupdate,
DiscoInfo = make_disco_info(JID, State),
Extras = iq_disco_info_extras(<<"en">>, State, true),
@ -2175,8 +2175,8 @@ send_self_presence(JID, State) ->
id = p1_rand:get_string(),
sub_els = Els2}).
-spec send_initial_presence(jid(), state(), state()) -> ok.
send_initial_presence(NJID, StateData, OldStateData) ->
-spec send_self_presence(jid(), state(), state()) -> ok.
send_self_presence(NJID, StateData, OldStateData) ->
send_new_presence(NJID, <<"">>, true, StateData, OldStateData).
-spec send_update_presence(jid(), state(), state()) -> ok.
@ -3513,7 +3513,7 @@ send_config_change_info(New, #state{config = Old} = StateData) ->
if Codes /= [] ->
maps:fold(
fun(_LJID, #user{jid = JID}, _) ->
send_self_presence(JID, StateData#state{config = New})
advertise_entity_capabilities(JID, StateData#state{config = New})
end, ok, StateData#state.users),
Message = #message{type = groupchat,
id = p1_rand:get_string(),