mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-11 20:42:23 +01:00
Fix hiding devices names over federation (#10015)
And don't include blank opentracing stuff in device list updates. Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
1c777ef1e8
commit
2a76a7369f
2 changed files with 9 additions and 2 deletions
1
changelog.d/10015.bugfix
Normal file
1
changelog.d/10015.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Prevent device names from appearing in device list updates when `allow_device_name_lookup_over_federation` is `false`.
|
|
@ -539,9 +539,11 @@ class DeviceWorkerStore(RoomMemberWorkerStore, EndToEndKeyWorkerStore):
|
||||||
"device_id": device_id,
|
"device_id": device_id,
|
||||||
"prev_id": [prev_id] if prev_id else [],
|
"prev_id": [prev_id] if prev_id else [],
|
||||||
"stream_id": stream_id,
|
"stream_id": stream_id,
|
||||||
"org.matrix.opentracing_context": opentracing_context,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if opentracing_context != "{}":
|
||||||
|
result["org.matrix.opentracing_context"] = opentracing_context
|
||||||
|
|
||||||
prev_id = stream_id
|
prev_id = stream_id
|
||||||
|
|
||||||
if device is not None:
|
if device is not None:
|
||||||
|
@ -549,7 +551,11 @@ class DeviceWorkerStore(RoomMemberWorkerStore, EndToEndKeyWorkerStore):
|
||||||
if keys:
|
if keys:
|
||||||
result["keys"] = keys
|
result["keys"] = keys
|
||||||
|
|
||||||
device_display_name = device.display_name
|
device_display_name = None
|
||||||
|
if (
|
||||||
|
self.hs.config.federation.allow_device_name_lookup_over_federation
|
||||||
|
):
|
||||||
|
device_display_name = device.display_name
|
||||||
if device_display_name:
|
if device_display_name:
|
||||||
result["device_display_name"] = device_display_name
|
result["device_display_name"] = device_display_name
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue