Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC4133: Extending User Profile API with Key:Value Pairs #4133

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

tcpipuk
Copy link

@tcpipuk tcpipuk commented Apr 19, 2024

Rendered

Signed-off-by: Tom Foster tom@tcpip.uk

@tcpipuk tcpipuk changed the title MSC0000: Extending User Profile API with Key:Value Pairs MSC4133: Extending User Profile API with Key:Value Pairs Apr 19, 2024
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Apr 19, 2024
proposals/4133-extended-profiles.md Outdated Show resolved Hide resolved
proposals/4133-extended-profiles.md Outdated Show resolved Hide resolved
@turt2live
Copy link
Member

@tcpipuk when you get a chance, please sign off on your changes to allow the MSC to eventually be eligible for acceptance.

@tcpipuk

This comment was marked as resolved.

@turt2live
Copy link
Member

Looks great, thanks!

@tcpipuk
Copy link
Author

tcpipuk commented Apr 19, 2024

Thanks to feedback from Travis in #matrix-spec:matrix.org, I've clarified my intention that this MSC is freetext for both keys and values - I'd love for the community to be inspired and have certain fields "promoted" to full per-room member events, but this is intended to keep timelines clean while allowing users to communicate small pieces of information about themselves in their profile that may be interesting to other users.

@tcpipuk tcpipuk marked this pull request as ready for review April 19, 2024 19:46
@andrewzhurov
Copy link

Seems we discuss here a key-value CRDT, as keys would need to be updated over time. Personally, I'm all in favor.
With no regard be those events a part of a (messaging) Room or be in its own Profile Room (#1769) (which would be neat),
we need a mechanism to get the latest key-value pairs.

Matrix Event Graph is isomorphic to Merkle-CRDT that powers OrbitDB (key-value DB is one of the supported CRDT).
Taking an inspiration from how key-value CRDT works may be of help to spec it for those Servers wishing to opt-in.

proposals/4133-extended-profiles.md Show resolved Hide resolved
proposals/4133-extended-profiles.md Show resolved Hide resolved
proposals/4133-extended-profiles.md Outdated Show resolved Hide resolved
Co-authored-by: Tulir Asokan <tulir@maunium.net>
Comment on lines +127 to +130
The existing fields, `avatar_url` and `displayname`, will continue to trigger state events in each
room. These fields are replicated per-room via member events. Custom fields, however, will **not**
trigger state events in rooms. They will exist solely at the global level and are intended for
storing metadata about the user that does not need to be replicated in each room.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see the same semantics here as in MSC4069, where a client can inhibit updating the profile info in rooms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(In addition, this would also allow users to override these profile values per room, say one's exploring their identity and wants to try different pronouns etc. etc. in a room with trusted friends, besides other use cases)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of #4069 and this looks like great functionality!

I don't think either MSC really clashes with the other, only that #4069 may want a tweak to mention allowing more "special" keys than just avatar_url and displayname in the future if they're added.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it's worth noting this MSC doesn't add any new fields that are published per-room in member events, this MSC exists solely to add fields to the user's public profile at an account-wide level)

Comment on lines +62 to +66
```json
{
"displayname": "Alice Wonderland"
}
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make sense for the key to be value instead of the field's name?
This would avoid potential future expansion clashing with existing keys (eg. a privacy field, rooms, etc. etc.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd far rather we maximise compatibility with current clients than a breaking change that requires all clients to change to update basic fields like name/picture.

The only way we could do that at the moment would be to add workarounds/exceptions for displayname and avatar_url which seems like a backward step when this MSC aims to offer a clean way to expand the current set of profile fields.

There's no reason this couldn't change in a future/extra MSC, which could investigate how extra metadata would be treated, but it could also just as easily add metadata keys (like "privacy" or "rooms" keys) while communicating the actual value under the name of the key.

I can imagine that being quite a contentious debate that could hold the MSC up for a while, when this one's main purpose is to get some basic profile field functionality out quickly while we wait for more advanced profile functionality (like "profile rooms") to be ironed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants