From fbacad8676a8e87ffbf6fe564ef65659c21801ab Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 12 Sep 2022 21:22:33 +0300 Subject: [PATCH] Add shortcut for redact in MaubotMessageEvent --- maubot/matrix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maubot/matrix.py b/maubot/matrix.py index 9c90c8f..a66ebfe 100644 --- a/maubot/matrix.py +++ b/maubot/matrix.py @@ -123,6 +123,9 @@ class MaubotMessageEvent(MessageEvent): def react(self, key: str) -> Awaitable[EventID]: return self.client.react(self.room_id, self.event_id, key) + def redact(self, reason: str | None = None) -> Awaitable[EventID]: + return self.client.redact(self.room_id, self.event_id, reason=reason) + def edit( self, content: str | MessageEventContent,