25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Remove a remaining jlib:jid_remove_resource/1 call.

PR:		EJABP-1

SVN Revision: 1620
This commit is contained in:
Jean-Sébastien Pédron 2008-10-10 14:36:25 +00:00
parent 129b0e99cf
commit 53bea055aa
2 changed files with 7 additions and 4 deletions

View File

@ -15,6 +15,9 @@
* src/ejabberd_config.erl (normalize_hosts/2): Replace jlib:nodeprep/1
by exmpp_stringprep:nodeprep/1 and change the error handling.
* src/ejabberd_c2s.erl (handle_sync_event/4): Remove a remaining
jlib:jid_remove_resource/1 call.
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which

View File

@ -940,10 +940,10 @@ handle_sync_event({get_presence}, _From, StateName, StateData) ->
handle_sync_event(get_subscribed, _From, StateName, StateData) ->
Subscribed = StateData#state.pres_f,
Online = StateData#state.pres_available,
Pred = fun(User, _Caps) ->
?SETS:is_element(jlib:jid_remove_resource(User),
Pred = fun({U, S, _} = User, _Caps) ->
?SETS:is_element({U, S, undefined},
Subscribed) orelse
?SETS:is_element(User, Subscribed)
?SETS:is_element(User, Subscribed)
end,
SubscribedAndOnline = ?DICT:filter(Pred, Online),
SubscribedWithCaps = ?SETS:fold(fun(User, Acc) ->
@ -957,7 +957,7 @@ handle_sync_event(get_subscribed_and_online, _From, StateName, StateData) ->
Pred = fun({U, S, _R} = User, _Caps) ->
?SETS:is_element({U, S, undefined},
Subscribed) orelse
?SETS:is_element(User, Subscribed)
?SETS:is_element(User, Subscribed)
end,
SubscribedAndOnline = ?DICT:filter(Pred, Online),
{reply, ?DICT:to_list(SubscribedAndOnline), StateName, StateData};