]> granicus.if.org Git - ejabberd/commitdiff
apply badlop's patch from http://www.ejabberd.im/node/3629
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 25 Aug 2009 15:09:12 +0000 (15:09 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 25 Aug 2009 15:09:12 +0000 (15:09 +0000)
SVN Revision: 2530

src/jlib.hrl
src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/mod_pubsub_odbc.erl

index 3ed25d3ca24dbbdf778afcfb54a1ca1bf5a8ad34..9e268642ed4c9be7be6df937263a7416dbf8db26 100644 (file)
@@ -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").
index 38c9ccac4760063a51ba0347e1c26b291a9e33c5..5bee62705818742b6745c05efa4e24c584dbbc05 100644 (file)
@@ -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"}],
index a072cfd2142d0d80532f6fb4208d3298be958bab..3bad02fb7ddec0a97c7a2467fac914624ba07ee5 100644 (file)
@@ -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"}],