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

fix API issue for subscribe/unsubscribe (EJAB-1410)

This commit is contained in:
Christophe Romain 2011-02-21 14:45:05 +01:00
parent 15749a2193
commit 0b7bb342cf

View File

@ -1,4 +1,3 @@
%%% ====================================================================
%%% ``The contents of this file are subject to the Erlang Public License,
%%% Version 1.1, (the "License"); you may not use this file except in
%%% compliance with the License. You should have received a copy of the
@ -321,6 +320,8 @@ delete_node(Nodes) ->
| {'error', _} %% TODO add all error cases
).
subscribe_node(NodeIdx, Sender, {U, S, R}, AccessModel, SendLast, PresenceSubscription, RosterGroup, Options) ->
subscribe_node(NodeIdx, Sender, exmpp_jid:make({U, S, R}), AccessModel, SendLast, PresenceSubscription, RosterGroup, Options);
subscribe_node(NodeIdx, #jid{node = Usender, domain = Ssender} = _Sender, #jid{node = U, domain = S, resource = R} = Subscriber, AccessModel, SendLast, PresenceSubscription, RosterGroup, Options) ->
SubKey = {U, S, R},
GenKey = {U, S, undefined},
@ -395,6 +396,8 @@ subscribe_node(NodeIdx, #jid{node = Usender, domain = Ssender} = _Sender, #jid{n
-> {'result', 'default'} | {'error', _} %% TODO : add all error cases
).
unsubscribe_node(NodeIdx, Sender, {U, S, R}, SubId) ->
unsubscribe_node(NodeIdx, Sender, exmpp_jid:make({U, S, R}), SubId);
unsubscribe_node(NodeIdx, #jid{node = Usender, domain = Ssender} = _Sender, #jid{node = U, domain = S, resource = R} = _Subscriber, SubId) ->
SubKey = {U, S, R},
GenKey = {U, S, undefined},