Change event.react() to use client.react()

This commit is contained in:
Tulir Asokan 2019-06-21 14:40:12 +03:00
parent d56ec94d34
commit 72b7e81f97

View file

@ -72,9 +72,7 @@ class MaubotMessageEvent(MessageEvent):
return self.client.send_receipt(self.room_id, self.event_id, "m.read")
def react(self, key: str) -> Awaitable[None]:
content = ReactionEventContent(relates_to=RelatesTo(rel_type=RelationType.ANNOTATION,
event_id=self.event_id, key=key))
return self.client.send_message_event(self.room_id, EventType.REACTION, content)
return self.client.react(self.room_id, self.event_id, key)
class MaubotMatrixClient(MatrixClient):