unee-t / lambda2sqs

Relays SQL triggered payloads to MEFE via a queue
https://ap-southeast-1.console.aws.amazon.com/lambda/home?region=ap-southeast-1#/applications/lambda2sqs
GNU Affero General Public License v3.0
0 stars 4 forks source link

case_new_message #5

Closed franck-boullier closed 6 years ago

franck-boullier commented 6 years ago

We have a SNS event active each time a case is updated. The notification type is case_new_message

We need to generate the email notification for this type of notification too.

kaihendry commented 6 years ago

https://github.com/unee-t/lambda2sns/blob/master/tests/events/case_new_message.json

kaihendry commented 6 years ago

Who do emails needs to be sent to here?

https://github.com/unee-t/lambda2sns/blob/master/tests/events/case_new_message.json#L12-L13

Anyone else?

kaihendry commented 6 years ago

Bit confused as to where assignee_user_id disappeared to. https://github.com/unee-t/lambda2sns/pull/2

Do you see (my confusion in) how assignee_user_id is somehow old_case_assignee_user_id or new_case_assignee_user_id ?

Why has this changed and broken the existing notification code?

Can you be explicit to who are recipients are in this case please. Pull out the values from https://github.com/unee-t/lambda2sns/blob/master/tests/events/case_new_message.json

franck-boullier commented 6 years ago

Notifications should be sent to:

The notification routine must check if each user has subscribed to this type of notifications before sending the email notification.

franck-boullier commented 6 years ago

Above comment updated for better clarity

franck-boullier commented 6 years ago

@kaihendry please note that the names of the variable for the user who has initiated the change (user_id) for the notification type case_updated is NOT the same as the variable for the user who has created a new message (created_by_user_id) for the notification type case_new_message.

kaihendry commented 6 years ago

IIUC https://github.com/unee-t/lambda2sns/blob/master/tests/events/case_new.json has been replaced with case_new_message. So I will be deleting case_new. Very confusing.

kaihendry commented 6 years ago

@franck-boullier for clarity please list the user ids who will receive the message.