pass back userid/deviceid
This commit is contained in:
parent
8e186d5cdc
commit
061a631d44
3 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue