mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-29 03:28:34 +00:00
Apply suggestions from code review
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Andrew Morgan
Copilot Autofix powered by AI
parent
8e75e7b21d
commit
18978f02e5
@@ -320,7 +320,7 @@ include_profile_data_on_invite: false
|
||||
---
|
||||
### `include_profile_updates_in_sync`
|
||||
|
||||
*(boolean)* Use this option to include updates of other users profiles in sync responses, for users who share rooms.
|
||||
*(boolean)* Use this option to include updates of other users' profiles in sync responses, for users who share rooms.
|
||||
Note, requires an MSC4429 compatible client, and is currently limited to legacy sync and local users only. Defaults to `false`.
|
||||
|
||||
Example configuration:
|
||||
|
||||
@@ -545,7 +545,7 @@ class ServerConfig(Config):
|
||||
" 'allow_public_rooms_over_federation' is set."
|
||||
)
|
||||
|
||||
# Whether to support MSC4299 profile updates down legacy /sync
|
||||
# Whether to support MSC4429 profile updates down legacy /sync
|
||||
self.include_profile_updates_in_sync = config.get(
|
||||
"include_profile_updates_in_sync",
|
||||
False,
|
||||
|
||||
@@ -505,7 +505,7 @@ class ProfileHandler:
|
||||
self._notifier.on_new_event(
|
||||
StreamKeyType.PROFILE_UPDATES,
|
||||
stream_id,
|
||||
rooms=set(room_id),
|
||||
rooms={room_id},
|
||||
)
|
||||
|
||||
async def user_joined_room(self, user_id: UserID, room_id: str) -> None:
|
||||
@@ -542,7 +542,7 @@ class ProfileHandler:
|
||||
self._notifier.on_new_event(
|
||||
StreamKeyType.PROFILE_UPDATES,
|
||||
stream_id,
|
||||
rooms=set(room_id),
|
||||
rooms={room_id},
|
||||
)
|
||||
|
||||
async def dispatch_delete_profile_upon_deactivation(
|
||||
|
||||
@@ -2402,7 +2402,7 @@ class SyncHandler:
|
||||
)
|
||||
cache = self.get_lazy_loaded_profile_fields_cache(cache_key)
|
||||
# Only send this users field if we haven't recently sent it.
|
||||
# Our cache value to check against is an md5 of a string of
|
||||
# Our cache value to check against is a sha256 of a string of
|
||||
# user ID + field name + value, which ensures if the value
|
||||
# changes, we'll miss the cache, thus sending the field update
|
||||
# to the syncing user.
|
||||
|
||||
@@ -1393,7 +1393,7 @@ class StreamToken:
|
||||
f"to_device: {self.to_device_key}, device_list: {self.device_list_key}, "
|
||||
f"groups: {self.groups_key}, un_partial_stated_rooms: {self.un_partial_stated_rooms_key}, "
|
||||
f"thread_subscriptions: {self.thread_subscriptions_key}, sticky_events: {self.sticky_events_key}, "
|
||||
f"quarantined_media: {self.quarantined_media_key}), "
|
||||
f"quarantined_media: {self.quarantined_media_key}, "
|
||||
f"profile_updates: {self.profile_updates_key})"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user