File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
commands/interface-manager Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ export class Mjolnir {
183183 ) {
184184 this . protectedRoomsConfig = new ProtectedRoomsConfig ( client ) ;
185185 this . policyListManager = new PolicyListManager ( this ) ;
186- this . reactionHandler = new MatrixReactionHandler ( this . managementRoomId , client ) ;
186+ this . reactionHandler = new MatrixReactionHandler ( this . managementRoomId , client , clientUserId ) ;
187187
188188 const mutedModules = ( LogService as any ) . mutedModules ;
189189 if ( ! Array . isArray ( mutedModules ) ) {
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ export class MatrixReactionHandler extends EventEmitter {
2929 /**
3030 * A client to lookup the related events to reactions.
3131 */
32- private readonly client : MatrixSendClient
32+ private readonly client : MatrixSendClient ,
33+ /**
34+ * The user id of the client. Ignores reactions from this user
35+ */
36+ private readonly clientUserId : string
3337 ) {
3438 super ( ) ;
3539 this . listener = this . handleEvent . bind ( this ) ;
@@ -53,6 +57,9 @@ export class MatrixReactionHandler extends EventEmitter {
5357 if ( relatesTo [ 'rel_type' ] !== 'm.annotation' ) {
5458 return ;
5559 }
60+ if ( event [ 'sender' ] === this . clientUserId ) {
61+ return ;
62+ }
5663 const reactionKey = relatesTo [ 'key' ] ;
5764 const relatedEventId = relatesTo [ 'event_id' ] ;
5865 if ( ! ( typeof relatedEventId === 'string' && typeof reactionKey === 'string' ) ) {
You can’t perform that action at this time.
0 commit comments