File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
cerberus/src/web3adapter/watchers
evoting-api/src/web3adapter/watchers Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
181
181
// For Message entities, only process if they are system messages
182
182
if ( tableName === "messages" ) {
183
183
// Check if this is a system message (starts with $$system-message$$)
184
- const isSystemMessage = data . content && typeof data . content === 'string' && data . content . startsWith ( '$$system-message$$' ) ;
184
+ const isSystemMessage = data . text && data . text . includes ( '$$system-message$$' ) ;
185
+
185
186
186
187
if ( ! isSystemMessage ) {
187
188
console . log ( "📝 Skipping non-system message:" , data . id ) ;
Original file line number Diff line number Diff line change @@ -305,8 +305,7 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
305
305
306
306
// For Message entities, only process if they are system messages
307
307
if ( tableName === "messages" ) {
308
- // Check if this is a system message (starts with $$system-message$$)
309
- const isSystemMessage = data . content && typeof data . content === 'string' && data . content . startsWith ( '$$system-message$$' ) ;
308
+ const isSystemMessage = data . text && data . text . includes ( '$$system-message$$' ) ;
310
309
311
310
if ( ! isSystemMessage ) {
312
311
console . log ( "📝 Skipping non-system message:" , data . id ) ;
You can’t perform that action at this time.
0 commit comments