url: don't check urls in reply messages, fixes #80

This commit is contained in:
Tatu Wikman 2020-10-10 21:51:39 +03:00
parent 2cc98e3524
commit d9b9d9483e
No known key found for this signature in database
GPG Key ID: BF214F789950B74E
1 changed files with 5 additions and 1 deletions

View File

@ -53,11 +53,15 @@ class MatrixModule(BotModule):
if len(event.body) < 1: if len(event.body) < 1:
return return
# skip edited content to prevent spamming the same thing multiple times
if "content" in event.source: if "content" in event.source:
# skip edited content to prevent spamming the same thing multiple times
if "m.new_content" in event.source["content"]: if "m.new_content" in event.source["content"]:
self.logger.debug(f"Skipping edited event to prevent spam") self.logger.debug(f"Skipping edited event to prevent spam")
return return
# skip reply messages to prevent spam
if "m.relates_to" in event.source["content"]:
self.logger.debug("Skipping reply message to prevent spam")
return
# are we on in this room? # are we on in this room?
status = self.status.get(room.room_id, "OFF") status = self.status.get(room.room_id, "OFF")