handler_mark_read.lua 228 B

12345678910
  1. -- mark mail as read
  2. function mail.handlers.mark_read(playername, index)
  3. local messages = mail.getMessages(playername)
  4. if messages[index] then
  5. messages[index].unread = false
  6. end
  7. mail.setMessages(playername, messages)
  8. end