MSC4429: Profile Updates for Legacy Sync#4429
Conversation
82ac3a7 to
3b205f6
Compare
There was a problem hiding this comment.
Implementation requirements:
- Client (using)
- Server (sending)
There was a problem hiding this comment.
Introduces the `matrix_synapse_experimental_features_msc4429_enabled` variable (disabled by default), allowing Synapse to notify clients using the legacy /sync endpoint of profile changes for other users. See <matrix-org/matrix-spec-proposals#4429> Signed-off-by: Norman Ziegner <n.ziegner@hzdr.de>
To indicate to clients that they can stop tracking a given user's profile.
There was a problem hiding this comment.
Pull request overview
Adds a new MSC proposing how to deliver custom profile field updates over legacy /sync (similar in spirit to MSC4262 for Sliding Sync), including opt-in filtering and guidance for initial population/lazy-loading.
Changes:
- Proposes a new top-level
usersobject in/synccarrying per-userprofile_updates. - Introduces a new filter field (
profile_fields.ids) to opt-in to specific profile field IDs. - Documents expected server/client behavior (initial sync behavior, lazy-loading interactions, implementation notes).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Each entry in `profile_updates` represents a profile field and any changes to | ||
| its value. If its value is `null`, the field is treated as having been removed | ||
| from the user's profile (rather than literally being set to `null`). |
There was a problem hiding this comment.
@zecakeh pointed out on the equivalent Sliding Sync MSC that:
From the definition of
PUT /profile/{userId}/{keyName}:Servers MAY reject
nullvalues. Servers that acceptnullvalues SHOULD store them rather than treatingnullas a deletion request. Clients that want to delete a field, including its key and value, SHOULD use theDELETEendpoint instead.
So actually null is a valid value, and we can't use it as a signal to clients that a field has been deleted, unfortunately.
Instead, we'll probably want a removed_profile_fields array or similar:
{
"users": {
"@user:example.org": {
"profile_updates": {
"m.status": {
"text": "Swimming in the Great Lakes!",
"emoji": "🏊️"
},
},
"removed_profile_fields": ["m.other_field"]
}
}
}Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Rendered
Conflict of Interest declaration: I am employed by Element. This MSC was written as part of my work on the Element Backend Team to land a "user status" feature (based on top of custom profiles, see MSC4426) for a customer.