Pubsub subscription is now wrapped in pubsub tags (EJAB-580)
authorChristophe Romain <christophe.romain@process-one.net>
Fri, 21 Mar 2008 16:05:32 +0000 (16:05 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 21 Mar 2008 16:05:32 +0000 (16:05 +0000)
SVN Revision: 1244

ChangeLog
src/mod_pubsub/mod_pubsub.erl

index ef446182b4f6409b4fa531b131f4707626cf4a47..b36e509b375d28ea35a45ce1ee4ea2d6895ac871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
        * src/ejabberdctl.template: Likewise
        * tools/ejabberdctl: Likewise
 
+       * src/mod_pubsub/mod_pubsub.erl: Pubsub subscription is now wrapped in
+       pubsub tags (EJAB-580)
+
 2008-03-21  Badlop  <badlop@process-one.net>
 
        * src/cyrsasl_digest.erl: Rewrite io:format calls to loglevel
index 44d5b26c85dd0dedb17e44560024dd74894cdeef..f70129de923c461644a6b405cfe60ee2721dff7a 100644 (file)
@@ -1355,13 +1355,12 @@ subscribe_node(Host, Node, From, JID) ->
                        [{"node", node_to_string(Node)},
                         {"jid", jlib:jid_to_string(Subscriber)},
                         {"subscription", subscription_to_string(Subscription)}],
-                   case Subscription of
-                       subscribed ->
-                           [{xmlelement, "subscription",
-                             Fields ++ [{"subid", SubId}], []}];
-                       _ ->
-                           [{xmlelement, "subscription", Fields, []}]
-                   end
+                   [{xmlelement, "pubsub", [{"xmlns", ?NS_PUBSUB}], 
+                       [{xmlelement, "subscription",
+                           case Subscription of
+                           subscribed -> [{"subid", SubId}|Fields];
+                           _ -> Fields
+                           end, []}]}]
            end,
     case transaction(Host, Node, Action, sync_dirty) of
        {error, Error} ->