mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix timestamp processing
This commit is contained in:
parent
8ce22b790d
commit
807a1fe164
@ -920,9 +920,13 @@ import(LServer) ->
|
|||||||
To = #jid{} = jlib:string_to_jid(
|
To = #jid{} = jlib:string_to_jid(
|
||||||
xml:get_attr_s(<<"to">>, El#xmlel.attrs)),
|
xml:get_attr_s(<<"to">>, El#xmlel.attrs)),
|
||||||
Stamp = xml:get_path_s(El, [{elem, <<"delay">>},
|
Stamp = xml:get_path_s(El, [{elem, <<"delay">>},
|
||||||
{elem, <<"stamp">>},
|
{attr, <<"stamp">>}]),
|
||||||
cdata]),
|
TS = case jlib:datetime_string_to_timestamp(Stamp) of
|
||||||
{_, _, _} = TS = jlib:datetime_string_to_timestamp(Stamp),
|
{_, _, _} = Now ->
|
||||||
|
Now;
|
||||||
|
undefined ->
|
||||||
|
now()
|
||||||
|
end,
|
||||||
Expire = find_x_expire(TS, El#xmlel.children),
|
Expire = find_x_expire(TS, El#xmlel.children),
|
||||||
#offline_msg{us = {LUser, LServer},
|
#offline_msg{us = {LUser, LServer},
|
||||||
from = From, to = To,
|
from = From, to = To,
|
||||||
|
Loading…
Reference in New Issue
Block a user