mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
fix API issue for subscribe/unsubscribe (EJAB-1410)
This commit is contained in:
parent
15749a2193
commit
0b7bb342cf
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user