Fix luacheck

This commit is contained in:
Athozus 2023-04-02 09:59:15 +02:00 committed by GitHub
parent bfabed9b52
commit 0556229429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,21 +62,15 @@ local function migrate_v2_to_v3()
local player_inbox = read_json_file(maildir .. "/" .. saneplayername .. ".json")
print("[mail,v2] + migrating player '" .. playername .. "'")
for _, msg in ipairs(player_inbox) do
local reading_status = false
if msg.unread then
reading_status = false
else
reading_status = true
end
table.insert(entry.inbox, {
id = mail.new_uuid(),
from = msg.sender or msg.from,
to = msg.to or playername,
cc = msg.cc,
subject = msg.subject,
body = msg.body,
time = msg.time or os.time(),
read = reading_status,
id = mail.new_uuid(),
from = msg.sender or msg.from,
to = msg.to or playername,
cc = msg.cc,
subject = msg.subject,
body = msg.body,
time = msg.time or os.time(),
read = not msg.unread,
})
end