25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-02 16:37:52 +01:00

Pubsub subscription is now wrapped in pubsub tags (EJAB-580)

SVN Revision: 1245
This commit is contained in:
Christophe Romain 2008-03-21 16:05:42 +00:00
parent 01b4b77373
commit 9e60b2b0a6
2 changed files with 9 additions and 7 deletions

View File

@ -5,6 +5,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

View File

@ -1351,13 +1351,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} ->