From 91f804d4cf13efb9c81ca911596bade6b9818c52 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 30 Oct 2018 21:29:58 +0200 Subject: [PATCH 1/3] Allow commands for all non-notice message types --- maubot/matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maubot/matrix.py b/maubot/matrix.py index 5f0150d..1ac9167 100644 --- a/maubot/matrix.py +++ b/maubot/matrix.py @@ -84,7 +84,7 @@ class MaubotMatrixClient(MatrixClient): pass async def _command_event_handler(self, evt: MessageEvent) -> None: - if evt.sender == self.mxid or evt.content.msgtype != MessageType.TEXT: + if evt.sender == self.mxid or evt.content.msgtype == MessageType.NOTICE: return for command in self.commands: if command.match(evt): From a2ba9b245eeb6acab4d155eecd43392aed64c806 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 30 Oct 2018 21:40:41 +0200 Subject: [PATCH 2/3] Update mautrix.util imports --- maubot/config.py | 2 +- maubot/plugin.py | 2 +- maubot/plugin_base.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maubot/config.py b/maubot/config.py index 6858482..699003c 100644 --- a/maubot/config.py +++ b/maubot/config.py @@ -16,7 +16,7 @@ import random import string -from mautrix.util import BaseFileConfig, ConfigUpdateHelper +from mautrix.util.config import BaseFileConfig, ConfigUpdateHelper class Config(BaseFileConfig): diff --git a/maubot/plugin.py b/maubot/plugin.py index 65875ef..facb0bf 100644 --- a/maubot/plugin.py +++ b/maubot/plugin.py @@ -19,7 +19,7 @@ from ruamel.yaml import YAML import logging import io -from mautrix.util import BaseProxyConfig, RecursiveDict +from mautrix.util.config import BaseProxyConfig, RecursiveDict from mautrix.types import UserID from .db import DBPlugin diff --git a/maubot/plugin_base.py b/maubot/plugin_base.py index b28ab4a..08d1211 100644 --- a/maubot/plugin_base.py +++ b/maubot/plugin_base.py @@ -24,7 +24,7 @@ import sqlalchemy as sql if TYPE_CHECKING: from .client import MaubotMatrixClient from .command_spec import CommandSpec - from mautrix.util import BaseProxyConfig + from mautrix.util.config import BaseProxyConfig class Plugin(ABC): From 26c4fae4645c0636fa43f439542a9e9ada9a20e6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 30 Oct 2018 21:42:21 +0200 Subject: [PATCH 3/3] Update version --- maubot/__meta__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maubot/__meta__.py b/maubot/__meta__.py index 364550b..32cb26d 100644 --- a/maubot/__meta__.py +++ b/maubot/__meta__.py @@ -1 +1 @@ -__version__ = "0.1.0.dev4" +__version__ = "0.1.0.dev5"