pass back userid/deviceid

This commit is contained in:
saces 2026-02-11 11:00:21 +01:00
parent 8e186d5cdc
commit 061a631d44
3 changed files with 4 additions and 3 deletions

View file

@ -29,9 +29,8 @@ class DemoBot(SMALBot):
logger.error(f"not a room message: {msg}")
return
if msg["sender"] == "get own id from missing code":
if msg["sender"] == self.UserID:
# ignore own messages
# for now just do not send valid commands by yourself
logger.info(f"ignore own message: {msg}")
return

View file

@ -62,6 +62,8 @@ class _MXClient:
result_dict = json.loads(result)
self.client_id = result_dict["id"]
self.UserID = result_dict["userid"]
self.DeviceID = result_dict["deviceid"]
def _sync(self):
r = lib.apiv0_startclient(self.client_id)