From 0b7bb342cff18b1f630c78b6a6aa4a3474f78248 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Mon, 21 Feb 2011 14:45:05 +0100 Subject: [PATCH] fix API issue for subscribe/unsubscribe (EJAB-1410) --- src/mod_pubsub/node_flat.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mod_pubsub/node_flat.erl b/src/mod_pubsub/node_flat.erl index aa583278a..5ec336cde 100644 --- a/src/mod_pubsub/node_flat.erl +++ b/src/mod_pubsub/node_flat.erl @@ -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},