mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Fix a confusion between #jid and tuples.
PR: EJABP-1 Submitted by: Pablo Polvorin <pablo.polvorin@process-one.net> SVN Revision: 1604
This commit is contained in:
parent
01da93bf70
commit
5ceffdd5a7
@ -7,6 +7,9 @@
|
||||
* src/ejabberd_c2s.erl (process_privacy_iq/4): mod_privacy & friends
|
||||
may return an empty list. Thanks to Pablo Polvorin!
|
||||
|
||||
* src/mod_roster_odbc.erl (get_jid_info/4): Fix a confusion between
|
||||
#jid and tuples. Thanks to Pablo Polvorin!
|
||||
|
||||
2008-10-02 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||
|
||||
* src/mod_roster_odbc.erl: Fix a bug where a JID represented as a
|
||||
|
@ -740,14 +740,15 @@ get_in_pending_subscriptions(Ls, User, Server) ->
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%% JID is #jid record, because it's used latter on for both short_prepd_jid
|
||||
%% and short_prepd_bare_jid
|
||||
get_jid_info(_, User, Server, JID) ->
|
||||
try
|
||||
LUser = exmpp_stringprep:nodeprep(User),
|
||||
LServer = exmpp_stringprep:nameprep(Server),
|
||||
LJID = jlib:short_prepd_jid(JID),
|
||||
LJID = {N, D, R} = jlib:short_prepd_jid(JID),
|
||||
Username = ejabberd_odbc:escape(LUser),
|
||||
SJID = ejabberd_odbc:escape(exmpp_jid:jid_to_list(LJID)),
|
||||
SJID = ejabberd_odbc:escape(exmpp_jid:jid_to_list(N, D, R)),
|
||||
case catch odbc_queries:get_subscription(LServer, Username, SJID) of
|
||||
{selected, ["subscription"], [{SSubscription}]} ->
|
||||
Subscription = case SSubscription of
|
||||
@ -769,7 +770,8 @@ get_jid_info(_, User, Server, JID) ->
|
||||
LRJID == LJID ->
|
||||
{none, []};
|
||||
true ->
|
||||
SRJID = ejabberd_odbc:escape(exmpp_jid:jid_to_list(LRJID)),
|
||||
{LR_N, LR_D, LR_R} = LRJID,
|
||||
SRJID = ejabberd_odbc:escape(exmpp_jid:jid_to_list(LR_N, LR_D, LR_R)),
|
||||
case catch odbc_queries:get_subscription(LServer, Username, SRJID) of
|
||||
{selected, ["subscription"], [{SSubscription}]} ->
|
||||
Subscription = case SSubscription of
|
||||
|
Loading…
Reference in New Issue
Block a user