Add a setting for automatic marking read

When a message is opened
This commit is contained in:
Athozus 2023-07-16 22:59:56 +02:00
parent e038993f27
commit 0248b051ef
No known key found for this signature in database
GPG key ID: B50895022E8484BF
12 changed files with 267 additions and 242 deletions

View file

@ -44,7 +44,7 @@ function mail.show_message(name, id)
local body = minetest.formspec_escape(message.body) or ""
formspec = string.format(formspec, from, to, cc, date, subject, body)
if not message.read then
if not message.read and mail.get_setting(name, "auto_marking_read") then
-- mark as read
mail.mark_read(name, id)
end