diff --git a/ChangeLog b/ChangeLog index 64b64feb2..ee33d6557 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 25dc1352a..4c2f93a22 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -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};