Merge remote-tracking branch 'origin/erikj/fix_device_comparison' into matrix-org-hotfixes
This commit is contained in:
commit
c08c649fa1
1
changelog.d/4164.bugfix
Normal file
1
changelog.d/4164.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix noop checks when updating device keys, reducing spurious device list update notifications.
|
|
@ -40,7 +40,10 @@ class EndToEndKeyStore(SQLBaseStore):
|
|||
allow_none=True,
|
||||
)
|
||||
|
||||
new_key_json = encode_canonical_json(device_keys)
|
||||
# In py3 we need old_key_json to match new_key_json type. The DB
|
||||
# returns unicode while encode_canonical_json returns bytes.
|
||||
new_key_json = encode_canonical_json(device_keys).decode("utf-8")
|
||||
|
||||
if old_key_json == new_key_json:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue