aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2009-08-25 15:09:12 +0000
committerChristophe Romain <christophe.romain@process-one.net>2009-08-25 15:09:12 +0000
commitf303a40973aabcc2b796d767e9002780ebf77efc (patch)
treed4c0787549849a46e49ab75e1e47f31b9aed2ded
parentadded function to rename old default nodes to hometree (diff)
apply badlop's patch from http://www.ejabberd.im/node/3629
SVN Revision: 2530
-rw-r--r--src/jlib.hrl1
-rw-r--r--src/mod_pubsub/mod_pubsub.erl5
-rw-r--r--src/mod_pubsub/mod_pubsub_odbc.erl5
3 files changed, 7 insertions, 4 deletions
diff --git a/src/jlib.hrl b/src/jlib.hrl
index 3ed25d3ca..9e268642e 100644
--- a/src/jlib.hrl
+++ b/src/jlib.hrl
@@ -82,6 +82,7 @@
-define(NS_COMPRESS, "http://jabber.org/protocol/compress").
-define(NS_CAPS, "http://jabber.org/protocol/caps").
+-define(NS_SHIM, "http://jabber.org/protocol/shim").
%% CAPTCHA related NSes.
-define(NS_OOB, "jabber:x:oob").
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl
index 38c9ccac4..5bee62705 100644
--- a/src/mod_pubsub/mod_pubsub.erl
+++ b/src/mod_pubsub/mod_pubsub.erl
@@ -3632,8 +3632,9 @@ itemsEls(Items) ->
{xmlelement, "item", itemAttr(ItemId), Payload}
end, Items).
-add_headers({xmlelement, Name, Attrs, Els}, Headers) ->
- {xmlelement, Name, Attrs, Els ++ Headers}.
+add_headers({xmlelement, Name, Attrs, Els}, HeaderEls) ->
+ HeaderEl = {xmlelement, "headers", [{"xmlns", ?NS_SHIM}], HeaderEls},
+ {xmlelement, Name, Attrs, [HeaderEl | Els]}.
collection_shim(Node, Nodes) ->
[{xmlelement, "header", [{"name", "Collection"}],
diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl
index a072cfd21..3bad02fb7 100644
--- a/src/mod_pubsub/mod_pubsub_odbc.erl
+++ b/src/mod_pubsub/mod_pubsub_odbc.erl
@@ -3689,8 +3689,9 @@ itemsEls(Items) ->
{xmlelement, "item", itemAttr(ItemId), Payload}
end, Items).
-add_headers({xmlelement, Name, Attrs, Els}, Headers) ->
- {xmlelement, Name, Attrs, Els ++ Headers}.
+add_headers({xmlelement, Name, Attrs, Els}, HeaderEls) ->
+ HeaderEl = {xmlelement, "headers", [{"xmlns", ?NS_SHIM}], HeaderEls},
+ {xmlelement, Name, Attrs, [HeaderEl | Els]}.
collection_shim(Node, Nodes) ->
[{xmlelement, "header", [{"name", "Collection"}],