-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: notifications for missed chat messages #754
feat: notifications for missed chat messages #754
Conversation
@@ -412,6 +412,31 @@ const _notificationActions = { | |||
appointment: sampleAppointment, | |||
}, | |||
}, | |||
missed_one_on_one_chat_message: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action for missed 1:1 messages
loginToken: '', | ||
}, | ||
}, | ||
missed_course_chat_message: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action for missed group chat messages
} | ||
|
||
const notificationAction = chatType === ChatType.ONE_ON_ONE ? 'missed_one_on_one_chat_message' : 'missed_course_chat_message'; | ||
await Notification.actionTaken(userToNotify, notificationAction, notificationContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont need to iterate over each participant of a group conversation, because TalkJS itselfs triggers notifications for each participant of the group chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice overall!
…r-missed-chat-notification
} catch (error) { | ||
if (error instanceof InvalidSignatureError) { | ||
logger.info('Invalid Signature'); | ||
res.status(401).send({ error: 'Unauthorized' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing return / else
merging this as potentially conflicting with #702, won't be deployed so just create a followup PR if necessary :) |
Description
A user should get notifications from Lern-Fair if the user missed some chat messages
What was done?
Tests
concreteNotification
is created after a notification is triggered by TalkJS