25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Add another variant of transformation of offline_msg in mod_offline_mnesia

This commit is contained in:
Paweł Chmielowski 2019-08-16 18:34:42 +02:00
parent 9ec69b8d62
commit 07ef1775cd

View File

@ -168,9 +168,14 @@ need_transform({offline_msg, {U, S}, _, _, _, _, _})
when is_list(U) orelse is_list(S) ->
?INFO_MSG("Mnesia table 'offline_msg' will be converted to binary", []),
true;
need_transform({offline_msg, _, _, _, _, _, _, _}) ->
true;
need_transform(_) ->
false.
transform({offline_msg, {U, S}, Timestamp, Expire, From, To, _, Packet}) ->
#offline_msg{us = {U, S}, timestamp = Timestamp, expire = Expire,
from = From ,to = To, packet = Packet};
transform(#offline_msg{us = {U, S}, from = From, to = To,
packet = El} = R) ->
R#offline_msg{us = {iolist_to_binary(U), iolist_to_binary(S)},