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

o Fix a bug in get_in_pending_subscriptions() where the type of the

presence stanza was lost.
o  Reorganize a few lines in user_roster() to match mod_roster_odbc.

SVN Revision: 1566
This commit is contained in:
Jean-Sébastien Pédron 2008-09-18 14:55:43 +00:00
parent 56a0c8ed1d
commit e9d7ac68da
2 changed files with 10 additions and 6 deletions

View File

@ -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 <js.pedron@meetic-corp.com>
Merge from trunk (r1457 to r1563).

View File

@ -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),