forwarder: ignore Matrix events older than 2 minutes
This commit is contained in:
parent
ae5350556a
commit
37d0091aa1
|
@ -125,6 +125,11 @@ module.exports = class Forwarder {
|
||||||
return; // Prevent loop
|
return; // Prevent loop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Date.now() - event.getTs() >= 2 * 60 * 1000) {
|
||||||
|
// Ignore events older than 2 minutes
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let content = event.getContent();
|
let content = event.getContent();
|
||||||
|
|
||||||
if (event.getType() == "m.room.message" && this.isMatrixCommand(content.body)) {
|
if (event.getType() == "m.room.message" && this.isMatrixCommand(content.body)) {
|
||||||
|
|
Loading…
Reference in a new issue