File tree Expand file tree Collapse file tree
infrastructure/evault-core/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ export class MessageNotificationService {
7777 const recipients = [ ...allENames ] ;
7878 if ( recipients . length === 0 ) return ;
7979
80- const messageText = payload . content || payload . text || "" ;
80+ const rawText : string = payload . content || payload . text || "" ;
81+ const isSystemMessage = rawText . startsWith ( "$$system-message$$" ) ;
82+ const messageText = isSystemMessage
83+ ? rawText . replace ( "$$system-message$$" , "" ) . trim ( )
84+ : rawText ;
8185 const truncatedText =
8286 messageText . length > 100
8387 ? messageText . substring ( 0 , 100 ) + "..."
@@ -93,7 +97,11 @@ export class MessageNotificationService {
9397 let title : string ;
9498 let body : string ;
9599
96- if ( isDM ) {
100+ if ( isSystemMessage ) {
101+ const groupName = chatData . name || "a chat" ;
102+ title = `New system message in ${ groupName } ` ;
103+ body = truncatedText || "System update" ;
104+ } else if ( isDM ) {
97105 title = `New message from ${ senderDisplay } ` ;
98106 body = truncatedText || "Sent a message" ;
99107 } else {
You can’t perform that action at this time.
0 commit comments