From b95602a328c7b28b760b5d2920375f5ab83ab892 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Mon, 13 Mar 2023 13:29:42 +0100 Subject: [PATCH] add check for an ancient issue with missing `to` field --- migrate.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrate.lua b/migrate.lua index 7df1157..3dc33c7 100644 --- a/migrate.lua +++ b/migrate.lua @@ -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,