Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
74 stars 32 forks source link

Various improvements to private messages #339

Closed happy-river closed 3 years ago

happy-river commented 3 years ago

Improve the database models pertaining to private messages to separate the concerns of the type of a message, its read or unread status, and which mailbox it is in. Allow a message to have different read statuses and mailboxes for different users, which will allow for users to delete messages from their sent folders without deleting them from the recipient's inbox, and will allow messages to have multiple recipients who can mark them read independently. Support a future Trash folder, add a field to connect replies to their original message which will permit a future threaded view of PM conversations, and add a related sub field and some new message types to support moderator mail, messaging between users and the mods of a sub as a group.

Simplify the message reply form on the inbox and saved message pages by removing the To and Subject fields. Automatically attach the "Re:" to the subject on replies, make that "Re:" translatable, and fix the accumulation of "Re:"'s that could happen in the subjects of private message conversations. Move the HTML for the reply form into a file shared by the inbox and saved message templates. Add a markdown preview to the reply form as well as the send message modal on the user profile page.

On the inbox and saved message pages, reorder the buttons under each message. Put the sender's name in a link instead of a button, next to the timeago. Instead of showing a non-working "Read" button for messages which have been marked read, remove it. Change the "Block" button to say "Block sender".

Improve the styling of the Blocked Users page, and fix a bug where the block function was comparing localized and non-localized text.

Remove some unused code pertaining to messages, and add some tests.