diff options
author | Quentin Gliech <quenting@element.io> | 2023-03-24 16:09:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 11:09:39 -0400 |
commit | 5b70f240cf70b390db7e74ab614ace108fc08d70 (patch) | |
tree | ba3ec1ea343ef3957ffd2ee646b94e34573c4de0 /tests/replication | |
parent | Reject mentions on the C-S API which are invalid. (#15311) (diff) | |
download | synapse-5b70f240cf70b390db7e74ab614ace108fc08d70.tar.xz |
Make cleaning up pushers depend on the device_id instead of the token_id (#15280)
This makes it so that we rely on the `device_id` to delete pushers on logout, instead of relying on the `access_token_id`. This ensures we're not removing pushers on token refresh, and prepares for a world without access token IDs (also known as the OIDC). This actually runs the `set_device_id_for_pushers` background update, which was forgotten in #13831. Note that for backwards compatibility it still deletes pushers based on the `access_token` until the background update finishes.
Diffstat (limited to 'tests/replication')
-rw-r--r-- | tests/replication/test_pusher_shard.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/replication/test_pusher_shard.py b/tests/replication/test_pusher_shard.py index 0798b021c3..dcb3e6669b 100644 --- a/tests/replication/test_pusher_shard.py +++ b/tests/replication/test_pusher_shard.py @@ -51,12 +51,12 @@ class PusherShardTestCase(BaseMultiWorkerStreamTestCase): self.hs.get_datastores().main.get_user_by_access_token(access_token) ) assert user_dict is not None - token_id = user_dict.token_id + device_id = user_dict.device_id self.get_success( self.hs.get_pusherpool().add_or_update_pusher( user_id=user_id, - access_token=token_id, + device_id=device_id, kind="http", app_id="m.http", app_display_name="HTTP Push Notifications", |