commit 20ceef86811b1c1379aae65d322eccb2401fdede
parent f1f25285317088ccc74ce3527c5438ee371b9d57
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 17 Aug 2021 02:24:35 +0200
Use correct scope
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/maubot.yaml b/maubot.yaml
@@ -1,5 +1,5 @@
id: dev.nordgedanken.preventer.audio
-version: 0.1.5
+version: 0.1.6
license: AGPL-3.0-or-later
modules:
- maubot_audio_preventer
diff --git a/maubot_audio_preventer/bot.py b/maubot_audio_preventer/bot.py
@@ -41,7 +41,7 @@ class MaubotAudioPreventer(Plugin):
async def audio_event_handler(self, evt: MessageEvent) -> None:
if evt.content.msgtype != MessageType.AUDIO or evt.sender in self.config['whitelist']:
return
- if evt.get("m.voice") is None and evt.get("org.matrix.msc1767.audio") is None:
+ if evt.content.get("m.voice") is None and evt.content.get("org.matrix.msc1767.audio") is None:
return
await self.client.redact(evt.room_id, evt.event_id, "Voice messages are not allowed")