Merge pull request #36 from Athozus/master

Fix deletion in inbox trivial issue (#35)
This commit is contained in:
Athozus 2023-04-01 10:36:51 +02:00 committed by GitHub
commit 831829c9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ function mail.delete_mail(playername, msg_id)
local entry = mail.get_storage_entry(playername)
for i, msg in ipairs(entry.inbox) do
if msg.id == msg_id then
table.remove(entry.outbox, i)
table.remove(entry.inbox, i)
mail.set_storage_entry(playername, entry)
return
end