Skip to content

Commit

Permalink
Merge pull request #31 from Automattic/slack_bridge_ignore_certain_ma…
Browse files Browse the repository at this point in the history
…trix_events

Ignore certain matrix events
  • Loading branch information
ashfame authored Dec 20, 2023
2 parents 996021f + b708fdb commit f4edc32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,11 @@ export class Main {
return;
}

// ignore events which have slack_bridge_ignore property in content field set as True
if (ev.content["org.wordpress.slack_bridge_ignore"] !== undefined && ev.content["org.wordpress.slack_bridge_ignore"] === true) {
return;
}

this.incCounter(METRIC_RECEIVED_MESSAGE, {side: "matrix"});
const endTimer = this.startTimer("matrix_request_seconds");

Expand Down

0 comments on commit f4edc32

Please sign in to comment.