diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-11-13 10:44:53 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-11-13 10:44:53 +0300 |
commit | b8f22ff538da8297b66010912b3fc91e46ded5c0 (patch) | |
tree | c157db8f8325fbf136dfafaa9abdd477abecc0c8 /src/mod_offline_mnesia.erl | |
parent | Uncomment forgotten block of code (diff) |
Deprecate most of the functions from jlib.erl
Diffstat (limited to 'src/mod_offline_mnesia.erl')
-rw-r--r-- | src/mod_offline_mnesia.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mod_offline_mnesia.erl b/src/mod_offline_mnesia.erl index c9f088fa4..9fec9c4d5 100644 --- a/src/mod_offline_mnesia.erl +++ b/src/mod_offline_mnesia.erl @@ -42,7 +42,11 @@ store_messages(_Host, US, Msgs, Len, MaxOfflineMsgs) -> mnesia:write_lock_table(offline_msg); true -> ok end, - lists:foreach(fun (M) -> mnesia:write(M) end, Msgs) + lists:foreach( + fun(#offline_msg{packet = Pkt} = M) -> + El = xmpp:encode(Pkt), + mnesia:write(M#offline_msg{packet = El}) + end, Msgs) end end, mnesia:transaction(F). @@ -107,9 +111,7 @@ read_message_headers(LUser, LServer) -> fun(#offline_msg{from = From, to = To, packet = Pkt, timestamp = TS}) -> Seq = now_to_integer(TS), - NewPkt = jlib:add_delay_info(Pkt, LServer, TS, - <<"Offline Storage">>), - {Seq, From, To, NewPkt} + {Seq, From, To, TS, Pkt} end, Msgs), lists:keysort(1, Hdrs). |