Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MESSAGES] Send message feature #961

Open
Clm-Roig opened this issue Aug 7, 2022 · 1 comment
Open

[MESSAGES] Send message feature #961

Clm-Roig opened this issue Aug 7, 2022 · 1 comment

Comments

@Clm-Roig
Copy link
Member

Clm-Roig commented Aug 7, 2022

Who can do it

All users

Dependencies

Mandatory ➡️ #960

Facultative ➡️ #882

Feature description

  • Create a new message in t_message table ([MESSAGES] Create database table #960).
  • Send a mail to the recipient only if there have been no messages sent in the past hour (to avoid spamming the user)

Needed Parameters for the email :

  • recipientNickname
  • messageContent
  • senderId
  • senderNickname

Hello {recipientNickname},

You have received a message from {senderNickname} on the Grottocenter app :
{messageContent}

Click here or copy / paste the link below to answer to {senderNickname}:

https://grottocenter.org/messages/users/{senderId}/discussion/messages/{messageId}

  • If the email sending raises an exception because the email is invalid, set the mail_is_valid property of the recipient to true.

  • Inversely, if the mail was marked as invalid, if the sending succeeds, mark it as valid.

  • If [NOTIFICATION] Create and mark as read #882 is implemented, create a notification for the recipient.

Route & body

POST /api/v1/users/:recipientId/messages

{
  "body": "Hi, this is my message to you. It can be on multiple lines like the descriptions."
}
@urien
Copy link
Contributor

urien commented Aug 8, 2022

Is it possible to manage the situation where the email sent comes back with an error code. So we check the existing field in the user table, indicating that the registered email is no longer valid

@urien urien assigned Clm-Roig and unassigned Clm-Roig Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants