mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Improve <delay/> tag insertion
This commit is contained in:
parent
2de2d00f14
commit
ba47fd4649
@ -842,10 +842,12 @@ count_offline_messages(User, Server) ->
|
|||||||
|
|
||||||
-spec add_delay_info(message(), binary(),
|
-spec add_delay_info(message(), binary(),
|
||||||
undefined | erlang:timestamp()) -> message().
|
undefined | erlang:timestamp()) -> message().
|
||||||
add_delay_info(Packet, _LServer, undefined) ->
|
add_delay_info(Packet, LServer, TS) ->
|
||||||
Packet;
|
NewTS = case TS of
|
||||||
add_delay_info(Packet, LServer, {_, _, _} = TS) ->
|
undefined -> p1_time_compat:timestamp();
|
||||||
xmpp_util:add_delay_info(Packet, jid:make(LServer), TS,
|
_ -> TS
|
||||||
|
end,
|
||||||
|
xmpp_util:add_delay_info(Packet, jid:make(LServer), NewTS,
|
||||||
<<"Offline storage">>).
|
<<"Offline storage">>).
|
||||||
|
|
||||||
export(LServer) ->
|
export(LServer) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user