add api enpoint for creating rooms

This commit is contained in:
saces 2026-02-19 14:27:51 +01:00
parent 0697c3b9d0
commit d88c279c34
3 changed files with 33 additions and 0 deletions

View file

@ -93,6 +93,11 @@ class _MXClient:
r = lib.apiv0_joinedrooms(self.client_id)
return checkApiError(r)
def _createroom(self, data_dict):
data = json.dumps(data_dict).encode(encoding="utf-8")
r = lib.apiv0_createroom(self.client_id, data)
return checkApiError(r)
def process_event(self, evt):
if hasattr(self, "on_event") and callable(self.on_event):
self.on_event(evt)