Skip to content
Snippets Groups Projects
Verified Commit 1735495b authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add join_room

parent e5e96a1c
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,12 @@ class Matrix:
return self._put(endpoint, json_data=content)
def join_room(self, room):
"""Join a room using its ID."""
endpoint = "/r0/rooms/%s/join" % (room,)
return self._post(endpoint)
def send_room_message(self, room, text, msgtype="m.text"):
"""Send a message event to a room."""
content = {"msgtype": "m.text", "body": text}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment