server: Reuse the stored device id.
This commit is contained in:
parent
20b903ec52
commit
cea4b7846d
1 changed files with 5 additions and 1 deletions
|
@ -239,7 +239,7 @@ class MatrixServer(object):
|
||||||
|
|
||||||
def _change_client(self):
|
def _change_client(self):
|
||||||
host = ':'.join([self.config.address, str(self.config.port)])
|
host = ':'.join([self.config.address, str(self.config.port)])
|
||||||
self.client = HttpClient(host, self.config.username)
|
self.client = HttpClient(host, self.config.username, self.device_id)
|
||||||
|
|
||||||
def update_option(self, option, option_name):
|
def update_option(self, option, option_name):
|
||||||
if option_name == "address":
|
if option_name == "address":
|
||||||
|
@ -258,8 +258,12 @@ class MatrixServer(object):
|
||||||
value = W.config_string(option)
|
value = W.config_string(option)
|
||||||
self.access_token = ""
|
self.access_token = ""
|
||||||
|
|
||||||
|
self._load_device_id()
|
||||||
|
|
||||||
if self.client:
|
if self.client:
|
||||||
self.client.user = value
|
self.client.user = value
|
||||||
|
if self.device_id:
|
||||||
|
self.client.device_id = self.device_id
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue