mail/README.md

119 lines
4.7 KiB
Markdown
Raw Normal View History

2019-09-16 09:15:43 +03:00
Mail mod for Minetest (ingame mod)
2019-09-16 09:06:54 +03:00
======
2022-08-02 16:06:42 +03:00
![](https://github.com/mt-mods/mail/workflows/test/badge.svg)
![](https://github.com/mt-mods/mail/workflows/luacheck/badge.svg)
[![ContentDB](https://content.minetest.net/packages/mt-mods/mail/shields/downloads/)](https://content.minetest.net/packages/mt-mods/mail/)
2020-04-23 10:46:30 +03:00
2023-05-07 16:08:45 +03:00
This is a fork of @cheapie's mail mod.
2019-09-16 09:06:54 +03:00
2023-05-07 16:08:45 +03:00
It adds a mail-system that allows players to send each other messages in-game and via webmail (optional).
2019-09-16 09:06:54 +03:00
# Screenshot
2019-09-16 09:06:54 +03:00
2023-07-17 00:50:50 +03:00
![](screenshot_1.2.0.png)
2019-09-16 09:06:54 +03:00
# Installation
## In-game mail mod
2023-05-07 16:08:45 +03:00
Install it like any other mod: copy the directory `mail_mod` to your "worldmods" folder or use the [ContentDB](https://content.minetest.net)
2019-09-16 09:06:54 +03:00
## Webmail
2023-05-07 16:08:45 +03:00
To provide a web-based interface to receive/send mails you can use the [mtui](https://github.com/minetest-go/mtui) project.
2019-09-16 09:06:54 +03:00
# Commands/Howto
2023-05-07 16:08:45 +03:00
To access your mail type `/mail` command or click on the mail button in your inventory (`unified_inventory`).
Mails can be deleted, marked as read or unread, replied to and forwarded to another player. You can also manage your contacts and your mailing lists.
# Features
* Inbox page
* Outbox page
* Saved drafts
* Read/unread marks
* To/Cc/Bcc system
* Intuitive UI
* Contacts book
* Mailing lists
* Sorters/filters (new in 1.1.0)
* Multiple selection (new in 1.1.0)
* Settings
* Chat, on join, HUD and sound notifications
* Translated in : English, French, German, Chinese (both traditional and simplified), Spanish, Brazilian Portuguese.
2019-09-16 09:06:54 +03:00
View sent messages (new database, add maillists) (#26) * Add tabheader & sent formspec * Add show_sent function and show sent messages * Remove comment on selected_idxs test (show_sent) * Add variable to keep the previous tab instead of going back to the first one * Remove index variable verification on mark read/unread buttons since they are necessarily clicked on inbox view * Resize messages table to be aligned with close button at the bottom * Show date time (#27) * Show date in message reading * Fix wrong registered dates Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Rework header layout to add better space for date --------- Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Add insertion of messages into global storage mail.messages.json * Receive player messages from global storage * Add automatic generation of status for a new message (unread) * Mark read/unread/delete a message * Fix messages loading * Show every message received/sent via specific functions * Use global contacts functions and reconfigure add/remove functions * Create mail lists formspec based on contacts * Add deleting contact * Add ability to create mail lists * Fix inability to edit contact * Rework on editing/deletion of contacts/maillists * Add at symbol as prefix on maillists view * Add ability to choose default status (to/cc/bcc) Signed-off-by: Athozus <athozus@gmail.com> * Add ability to add multiples players and choose their default status (to/cc/bcc) * Add ability to use maillist in messages and receive messages from them * Fix repetition of code causing a crash * Avoid multiples occurences of the same messages due to player both in maillist and receivers * Fix selected indexes for inbox/sent Now separated, fixed show_message() func selection of id from table dcl/read btn * Fix many issues related to maillists Notably : edit, delete, selection, creation, registration of players * Set up database version v3 and its migration from v2 + Check versions to choose v1->v2 or v2->v3 * Fix mtt.lua Due to old function getMessages(), replaced by getPlayerInboxMessages() * Add 10 seconds security to mtt.lua * Fix migrate.lua non-declared variable * Send msg table with string keys in mtt * Better log messages * Add message check * Fix mtt crash * Better syntax in storage.lua * Fix bcc forgotten in mail.send() * Fix mtt issue * Better compatibility for messages storage Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Replace mail.split by builtin func Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Use builtin split func Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Use builtin split func in storage.lua * re-add mtt if * luacheck on PR * add check for an ancient issue with missing `to` field * Fix luacheck on storage.lua * Fix luacheck warnings in migrate.lua * Fix luacheck warnings in gui.lua * Fix luacheck (too long lines) in storage.lua * Unused loop values in migrate.lua * Whitespace line in gui.lua * Whitespace line (init.lua) * Whitespace line (api.lua) * Significantly improve maillist behaviour Replace maillist by its players when sending a message List of players separated by , Avoid doublons when editing more than 2 times a maillist * Fix luacheck * Fix table insertions at first index when no needed * Use funcs * Do not add maillist as a new contact when sending a mail * Fix removing elements from tables * Check maillists not added in contacts * storage rewrite wip * storage format docs * refactor ui components * show_compose cleanup * remove unused channel.lua * error -> err * status refactoring * contacts refactoring * maillist refactoring * docs * tests * fix some issues * re-enable migrations * contributors * prefix mail entries in the mod storage * internalize old mail-paths to migration module * add v1 and v2 player db examples and migration test * Ui improvements & fixes Move events code (if fields.x then) to events.lua (instead of inbox.lua), fix tab selection when going backward * Show most recent messages at first (outbox) * unified-inv fix --------- Signed-off-by: Athozus <athozus@gmail.com> Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2023-03-29 18:25:01 +03:00
# Compatibility / Migration
Overview:
* `v1` all the data is in the `<worldfolder>/mails.db` file
* `v2` every player has its own (in-) mailbox in the `<worldfolder>/mails/<playername>.json` file
2023-05-07 16:08:45 +03:00
* `v3` every player has an entry in the `<playername>` `mod_storage/` (inbox, outbox, drafts, contacts, mailing lists, settings)
View sent messages (new database, add maillists) (#26) * Add tabheader & sent formspec * Add show_sent function and show sent messages * Remove comment on selected_idxs test (show_sent) * Add variable to keep the previous tab instead of going back to the first one * Remove index variable verification on mark read/unread buttons since they are necessarily clicked on inbox view * Resize messages table to be aligned with close button at the bottom * Show date time (#27) * Show date in message reading * Fix wrong registered dates Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Rework header layout to add better space for date --------- Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Add insertion of messages into global storage mail.messages.json * Receive player messages from global storage * Add automatic generation of status for a new message (unread) * Mark read/unread/delete a message * Fix messages loading * Show every message received/sent via specific functions * Use global contacts functions and reconfigure add/remove functions * Create mail lists formspec based on contacts * Add deleting contact * Add ability to create mail lists * Fix inability to edit contact * Rework on editing/deletion of contacts/maillists * Add at symbol as prefix on maillists view * Add ability to choose default status (to/cc/bcc) Signed-off-by: Athozus <athozus@gmail.com> * Add ability to add multiples players and choose their default status (to/cc/bcc) * Add ability to use maillist in messages and receive messages from them * Fix repetition of code causing a crash * Avoid multiples occurences of the same messages due to player both in maillist and receivers * Fix selected indexes for inbox/sent Now separated, fixed show_message() func selection of id from table dcl/read btn * Fix many issues related to maillists Notably : edit, delete, selection, creation, registration of players * Set up database version v3 and its migration from v2 + Check versions to choose v1->v2 or v2->v3 * Fix mtt.lua Due to old function getMessages(), replaced by getPlayerInboxMessages() * Add 10 seconds security to mtt.lua * Fix migrate.lua non-declared variable * Send msg table with string keys in mtt * Better log messages * Add message check * Fix mtt crash * Better syntax in storage.lua * Fix bcc forgotten in mail.send() * Fix mtt issue * Better compatibility for messages storage Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Replace mail.split by builtin func Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Use builtin split func Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> * Use builtin split func in storage.lua * re-add mtt if * luacheck on PR * add check for an ancient issue with missing `to` field * Fix luacheck on storage.lua * Fix luacheck warnings in migrate.lua * Fix luacheck warnings in gui.lua * Fix luacheck (too long lines) in storage.lua * Unused loop values in migrate.lua * Whitespace line in gui.lua * Whitespace line (init.lua) * Whitespace line (api.lua) * Significantly improve maillist behaviour Replace maillist by its players when sending a message List of players separated by , Avoid doublons when editing more than 2 times a maillist * Fix luacheck * Fix table insertions at first index when no needed * Use funcs * Do not add maillist as a new contact when sending a mail * Fix removing elements from tables * Check maillists not added in contacts * storage rewrite wip * storage format docs * refactor ui components * show_compose cleanup * remove unused channel.lua * error -> err * status refactoring * contacts refactoring * maillist refactoring * docs * tests * fix some issues * re-enable migrations * contributors * prefix mail entries in the mod storage * internalize old mail-paths to migration module * add v1 and v2 player db examples and migration test * Ui improvements & fixes Move events code (if fields.x then) to events.lua (instead of inbox.lua), fix tab selection when going backward * Show most recent messages at first (outbox) * unified-inv fix --------- Signed-off-by: Athozus <athozus@gmail.com> Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2023-03-29 18:25:01 +03:00
2019-09-16 09:06:54 +03:00
# Dependencies
* None
# License
See the "LICENSE" file
2019-09-16 09:15:43 +03:00
# Textures
* textures/email_mail.png (https://github.com/rubenwardy/email.git WTFPL)
2023-05-07 16:08:45 +03:00
# Contributors / Credits
2019-09-16 09:15:43 +03:00
2023-04-14 12:45:26 +03:00
* Cheapie (Initial idea/project)
2023-04-15 20:37:45 +03:00
* Rubenwardy (Lua/UI improvements)
2023-04-14 12:45:26 +03:00
* BuckarooBanzay (Clean-ups, Refactoring)
2023-06-17 16:57:26 +03:00
* Athozus (Outbox, Maillists, UI, Drafts, Trash, Settings)
2023-04-14 12:45:26 +03:00
* SX (Various fixes, UI)
* fluxionary (Minor fixups)
* Toby1710 (UX fixes)
* Peter Nerlich (CC, BCC)
* Emojigit (Traditional Chinese translation)
2023-04-14 12:45:26 +03:00
* Niklp09 (German translation)
2023-05-02 16:54:06 +03:00
* Dennis Jenkins (UX fixes)
* Thomas Rudin (Maintenance)
* imre84 (UI fixes)
2023-05-06 00:28:32 +03:00
* Chache (Spanish translation)
2023-05-06 16:46:21 +03:00
* APercy (Brazilian Portuguese translation)
* Nuno Filipe Povoa (mail_notif.ogg - https://invent.kde.org/plasma/oxygen-sounds/-/blob/master/sounds/Oxygen-Im-Nudge.ogg)
* TheTrueBeginner (Simplified Chinese translation)
2023-06-17 16:57:26 +03:00
* nyomi (Hungarian translation)
* whosit (UI fixes)
2023-07-17 23:20:58 +03:00
* Wuzzy (German translation)
* Muhammad Rifqi Priyo Susanto (Indonesian translation)
2023-04-14 12:45:26 +03:00
2023-04-15 20:37:45 +03:00
# Contribute
You can contribute by :
2023-05-07 16:08:45 +03:00
* Reporting an issue : Go to the [Issues](https://github.com/mt-mods/mail/issues) tab, click on the button **New issue** and type a short title then give many informations (Minetest version, tab where the bug occured, steps to reproduce the crash, etc.)
* Give a review on ContentDB : [Just write ;)](https://content.minetest.net/packages/mt-mods/mail/review/)
* Requesting new features : [Open an issue](https://github.com/mt-mods/mail/issues) and indicate what you need more in details.
* Adding those new features : [Open a pull request](https://github.com/mt-mods/mail/pulls), and if issue(s) are linked, ping them (#number).
* Fixing an issue : Same as before, open a pull request.
* Translate into a new language : copy `locale/template.txt` into `locale/mail.<codelang>.tr`, and add translated strings (syntax : `not translated=translated`). Then, open a pull request. We're also working on opening a [Weblate](https://weblate.org) (free web interface) to translate strings easier.
* Add documentation : adds `.md` (markdown) or `.txt` files and open a pull request.
2023-04-15 20:37:45 +03:00
* ...
2023-05-07 16:08:45 +03:00
You're encouraged to create a fork of this repo, then make your changes and create a pull request when it's done. ~~If you do so, please also check "Git branches" section.~~ (obsolete). Request for merging into `master`, if needed we will push into another branch.
If you don't have a GitHub account, you can also contact maintainers to add manually your contributions.
2023-04-15 20:37:45 +03:00
2023-04-14 12:45:26 +03:00
# Git branches
2023-05-07 16:08:45 +03:00
***Caution : might be obsolete***
2023-04-14 12:45:26 +03:00
* master : main branch, where are pushed releases and tags
* dev : for new release works, A.B.C release to A.B+1.0
* A.B.X : for fix releases (no new features), A.B.C release to A.B.C+1
For a new fix release (A.B.C) : merge A.B.X branch to master
For a new release (A.B+1.0) : merge dev to master, with previous A.B.C merges (include fixes in master, prioritize dev branch in case of conflicts)
2019-09-16 09:15:43 +03:00
2019-09-16 09:06:54 +03:00
# Old/Historic stuff
* Old forum topic: https://forum.minetest.net/viewtopic.php?t=14464
* Old mod: https://cheapiesystems.com/git/mail/