mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +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(),
|
||||
undefined | erlang:timestamp()) -> message().
|
||||
add_delay_info(Packet, _LServer, undefined) ->
|
||||
Packet;
|
||||
add_delay_info(Packet, LServer, {_, _, _} = TS) ->
|
||||
xmpp_util:add_delay_info(Packet, jid:make(LServer), TS,
|
||||
add_delay_info(Packet, LServer, TS) ->
|
||||
NewTS = case TS of
|
||||
undefined -> p1_time_compat:timestamp();
|
||||
_ -> TS
|
||||
end,
|
||||
xmpp_util:add_delay_info(Packet, jid:make(LServer), NewTS,
|
||||
<<"Offline storage">>).
|
||||
|
||||
export(LServer) ->
|
||||
|
Loading…
Reference in New Issue
Block a user