Skip to content

Commit 5b393c2

Browse files
committed
add mention message content to mentioned msg notification
1 parent 7bc3387 commit 5b393c2

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

internal/conversation/conversation.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,8 @@ func (m *Manager) NotifyMention(conversationUUID string, message models.Message,
974974
"Email": recipient.Email.String,
975975
},
976976
"Message": map[string]any{
977-
"UUID": message.UUID,
977+
"UUID": message.UUID,
978+
"Content": message.Content,
978979
},
979980
"MentionedBy": map[string]any{
980981
"FirstName": author.FirstName,

internal/migrations/v0.10.0.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ func V0_10_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
5555
'email_notification'::template_type,
5656
'<p>{{ .MentionedBy.FullName }} mentioned you in a private note on conversation #{{ .Conversation.ReferenceNumber }}.</p>
5757
58+
<blockquote style="background-color: #f5f5f5; padding: 12px; margin: 16px 0; border-left: 4px solid #ddd;">
59+
{{ .Message.Content }}
60+
</blockquote>
61+
5862
<p>
5963
<a href="{{ RootURL }}/inboxes/mentioned/conversation/{{ .Conversation.UUID }}?scrollTo={{ .Message.UUID }}">View Conversation</a>
6064
</p>

schema.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,10 @@ VALUES (
840840
'
841841
<p>{{ .MentionedBy.FullName }} mentioned you in a private note on conversation #{{ .Conversation.ReferenceNumber }}.</p>
842842
843+
<blockquote style="background-color: #f5f5f5; padding: 12px; margin: 16px 0; border-left: 4px solid #ddd;">
844+
{{ .Message.Content }}
845+
</blockquote>
846+
843847
<p>
844848
<a href="{{ RootURL }}/inboxes/mentioned/conversation/{{ .Conversation.UUID }}?scrollTo={{ .Message.UUID }}">View Conversation</a>
845849
</p>

0 commit comments

Comments
 (0)