...
- add message object to synapse having subject, message, to, from, where 'to' is a list. Body is text, but might contain HTML or other formatting, but no attachments; services for create, read, delete, and various queries (get all messages I've created, get all messages sent to me, optionally filtered by status – see next line). Message could have a 'type' or 'sender type' to differentiate bet. system notifications and user-generated messages.
- add message status/annotation for <message,recipient>, esp. "READ", i.e. a user can mark that a message (possibly sent to them as well as others) has been read. Could also implement "DELETE" in this way (i.e the message is 'deleted' for a user though it is archived n the system).
- delete old messages (e.g. older than a month)
- authorization: any single user can send a message to any other single user, but to send to a Team requires SEND_MESSAGE permission on the Team, typically granted only to Team members.
- users controls whether message is sent by email or whether they go to their 'in box' to see messages (3rd option would be to be notified by email to go to Synapse in-box). (Note, this choice might go in a 'message setting' object for the user, later extended for other settings, e.g. a 'blocked sender' list).
...