Stanza;
%% If there's only one SubID, don't add it
{true, [_]} ->
- add_shim_headers(Stanza, collection_shim(NodeName));
+ Stnza;
{true, SubIDs} ->
- add_shim_headers(Stanza, lists:append(collection_shim(NodeName), subid_shim(SubIDs)))
+ add_shim_headers(Stanza, subid_shim(SubIDs))
end,
lists:foreach(fun(To) ->
ejabberd_router:route(From, jlib:make_jid(To), StanzaToSend)
#xmlel{name = Name, attrs = Attrs,
children = lists:append(Els, [HeaderEl])}.
-collection_shim(Node) ->
- [#xmlel{name = <<"header">>,
- attrs = [{<<"name">>, <<"Collection">>}],
- children = [{xmlcdata, Node}]}].
-
subid_shim(SubIds) ->
[#xmlel{name = <<"header">>,
attrs = [{<<"name">>, <<"SubId">>}],