maubot-audio-preventer

git clone git://archive.git.mtrnord.blog/MTRNord/maubot-audio-preventer.git
Log | Files | Refs | README | LICENSE

commit f1f25285317088ccc74ce3527c5438ee371b9d57
parent b210d93eb44c3747886479bd39abc259cf8de476
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 17 Aug 2021 02:22:48 +0200

Fix code bump version

Diffstat:
Mmaubot.yaml | 2+-
Mmaubot_audio_preventer/bot.py | 2+-
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.4 +version: 0.1.5 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: + if evt.get("m.voice") is None and evt.get("org.matrix.msc1767.audio") is None: return await self.client.redact(evt.room_id, evt.event_id, "Voice messages are not allowed")