add check for an ancient issue with missing to field

This commit is contained in:
BuckarooBanzay 2023-03-13 13:29:42 +01:00 committed by Athozus
parent d9fcd65066
commit b95602a328
No known key found for this signature in database
GPG key ID: B50895022E8484BF

View file

@ -66,7 +66,8 @@ function mail.migrate_messages_v2_to_v3()
break
end
end
if new_msg then
-- add if valid and "to" field populated (missing in ancient storage formats)
if new_msg and msg.to then
local msg_table = {
sender = msg.sender,
to = msg.to,