diff options
author | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-12-13 09:42:30 +0300 |
---|---|---|
committer | Evgeny Khramtsov <xramtsov@gmail.com> | 2014-12-13 09:42:30 +0300 |
commit | df88d9f2e52ffa11b14ee58f4e16214d3d77cf26 (patch) | |
tree | d421c0f9db98593ec49a99115b06de68f2563df4 /src/mod_pubsub.erl | |
parent | include static versions of deps in rebar.config/script (thanks to Holger WeiĆ... (diff) | |
parent | Let jlib use "B" instead of "w" to format integers (diff) |
Merge pull request #377 from weiss/new-timestamps
Add timestamps to stanzas resent from stream management queue
Diffstat (limited to 'src/mod_pubsub.erl')
-rw-r--r-- | src/mod_pubsub.erl | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index 5f16fed7e..f7d30558e 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -4275,21 +4275,15 @@ payload_xmlelements([_ | Tail], Count) -> %% @spec (Els) -> stanza() %% Els = [xmlelement()] %% @doc <p>Build pubsub event stanza</p> -event_stanza(Els) -> event_stanza_withmoreels(Els, []). - -event_stanza_with_delay(Els, ModifNow, ModifUSR) -> - DateTime = calendar:now_to_datetime(ModifNow), - MoreEls = [jlib:timestamp_to_xml(DateTime, utc, - ModifUSR, <<"">>)], - event_stanza_withmoreels(Els, MoreEls). - -event_stanza_withmoreels(Els, MoreEls) -> +event_stanza(Els) -> #xmlel{name = <<"message">>, attrs = [], children = [#xmlel{name = <<"event">>, attrs = [{<<"xmlns">>, ?NS_PUBSUB_EVENT}], - children = Els} - | MoreEls]}. + children = Els}]}. + +event_stanza_with_delay(Els, ModifNow, ModifUSR) -> + jlib:add_delay_info(event_stanza(Els), ModifUSR, ModifNow). %%%%%% broadcast functions |