feat: Tag agents in a private note (#1688)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2021-01-27 00:04:11 +05:30
committed by GitHub
parent b894b13e14
commit b93388b330
20 changed files with 424 additions and 93 deletions

View File

@@ -32,7 +32,8 @@ class Notification < ApplicationRecord
NOTIFICATION_TYPES = {
conversation_creation: 1,
conversation_assignment: 2,
assigned_conversation_new_message: 3
assigned_conversation_new_message: 3,
conversation_mention: 4
}.freeze
enum notification_type: NOTIFICATION_TYPES
@@ -67,6 +68,10 @@ class Notification < ApplicationRecord
return "New message in your assigned conversation [ID -#{primary_actor.display_id}]." if notification_type == 'assigned_conversation_new_message'
if notification_type == 'conversation_mention'
return "You have been mentioned in conversation [ID -#{primary_actor.conversation.display_id}] by #{secondary_actor.name}"
end
''
end