Skip to content

Commit a5e7063

Browse files
committed
Use fixed device_ids for login
This will cut down on throwaway devices being generated.
1 parent 7778c5d commit a5e7063

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build/purger/purger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def purge(
8383

8484
api = GMatrixHttpApi(server)
8585
try:
86-
response = api.login("m.login.password", user=username, password=password)
86+
response = api.login(
87+
"m.login.password", user=username, password=password, device_id="purger"
88+
)
8789
api.token = response["access_token"]
8890
except (MatrixError, KeyError) as ex:
8991
click.secho(f"Could not log in to server {server}: {ex}")

build/room_ensurer/room_ensurer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ def _connect(self, server_name: str, server_url: str) -> Tuple[str, GMatrixHttpA
338338
username = str(to_normalized_address(signer.address))
339339
password = encode_hex(signer.sign(server_name.encode()))
340340

341-
response = api.login("m.login.password", user=username, password=password)
341+
response = api.login(
342+
"m.login.password", user=username, password=password, device_id="room_ensurer"
343+
)
342344
api.token = response["access_token"]
343345
log.debug("Connected", server=server_name)
344346
return server_name, api

0 commit comments

Comments
 (0)