diff --git a/ChangeLog b/ChangeLog index fbaad6a97..335d81aa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * src/mod_roster_odbc.erl: Convert to exmpp. + * src/mod_roster.erl (get_in_pending_subscriptions): Fix a bug where + the type of the presence stanza was lost. + (user_roster): Reorganize a few lines to match mod_roster_odbc. + 2008-09-16 Jean-Sébastien Pédron Merge from trunk (r1457 to r1563). diff --git a/src/mod_roster.erl b/src/mod_roster.erl index fb9ba3cbd..878305652 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -649,12 +649,10 @@ get_in_pending_subscriptions(Ls, User, Server) -> fun(R) -> Message = R#roster.askmessage, {U, S, R} = R#roster.jid, - Attrs1 = exmpp_stanza:set_sender_in_list([], - exmpp_jid:jid_to_list(U, S, R)), - Attrs2 = exmpp_stanza:set_recipient_in_list(Attrs1, - exmpp_jid:jid_to_list(JID)), Pres1 = exmpp_presence:subscribe(), - Pres2 = Pres1#xmlel{attrs = Attrs2}, + Pres2 = exmpp_stanza:set_jids(Pres1, + exmpp_jid:jid_to_list(U, S, R), + exmpp_jid:jid_to_list(JID)), exmpp_presence:set_status(Pres2, Message) end, lists:filter( @@ -847,7 +845,9 @@ webadmin_page(Acc, _, _) -> Acc. user_roster(User, Server, Query, Lang) -> try - US = {exmpp_stringprep:nodeprep(User), exmpp_stringprep:nameprep(Server)}, + LUser = exmpp_stringprep:nodeprep(User), + LServer = exmpp_stringprep:nameprep(Server), + US = {LUser, LServer}, Items1 = mnesia:dirty_index_read(roster, US, #roster.us), Res = user_roster_parse_query(User, Server, Items1, Query), Items = mnesia:dirty_index_read(roster, US, #roster.us),