Merge pull request #104 from tswfi/url/fix_reply_spam

url: don't check urls in reply messages, fixes #80
This commit is contained in:
Ville Ranki 2020-10-10 22:30:51 +03:00 committed by GitHub
commit ea8fd74a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -53,11 +53,15 @@ class MatrixModule(BotModule):
if len(event.body) < 1:
return
# skip edited content to prevent spamming the same thing multiple times
if "content" in event.source:
# skip edited content to prevent spamming the same thing multiple times
if "m.new_content" in event.source["content"]:
self.logger.debug("Skipping edited event to prevent spam")
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?
status = self.status.get(room.room_id, "OFF")