Removing profile changes from the event graph #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Standard disclaimer I'll put on all my issues: I have hardly ever looked at the Matrix spec, and all my understanding of it is from observing its implementations. There will be incorrect information; for my sake please only provide technical corrections if they are relevant to the issue at hand.)
When a user changes their display name or profile picture, a
m.room.memberevent is added to the event graph of every room they are a member of. This has a number of problems (probably more than what's on this list):m.room.memberevent that doing so may cause various consistency issues (imo at no point should moderating a room result in consistency issues if at all possible).My suggestion would be to maintain profile data separately from the event graph. However given that this is a federated protocol there needs to be some way for the user's homeserver to notify other homeservers that a profile update has occurred. This could possibly be done outside the event graph, or a "please re-fetch profile data" message intended to be invisble to end users could be injected in the event graph.
Fully removing profile changes from the event graph would remove the potential ability to end-to-end encrypt profile information and have per-room profile information. The latter is technically possible in some Matrix clients today (I think? I've seen it before) but most clients will ignore if you've done this and override all rooms if you change any profile data.
per-room profile information is important to maintain I think, for the same reasons that discord allows setting per-guild display names / profile pictures: different social contexts may require different presentations.
I think if we were to also pursue #14, it would be possible to support per-room profile data by the same means: users could create an identity and tell their client to set that as the default identity to use within a given room (or heck, even a given space).
I think decoupling the room profile from the event type "m.room.member" is a huge improvement already, as (so you, the author, gets to know the technical background better) these are currently state events, which, as of now, cannot be deleted at all as they are required to calculate the state of the room (e.g. was someone then a member). So it’s not only filling up your local timeline, but also the servers as well. If they get decoupled, which should not require that many changes for now, the events making up a profile could become normal events, which servers or clients can just ignore or delete, if there are old enough. (I’m proposing this solution in the case that fully reimplementing profiles takes too much time (A better solution now is still helps more now than a perfect solution in a few decades)).
However, if the profiles get fully decoupled from rooms at all, which could take more work but IMO should be better in the long term, a "please re-fetch profile data" hint could even become an ephemeral event so these don’t get added to the persistent event graph However, then we would need another solution for recording profile changes in history.
I feel like these should remain in the event graph, especially in context of your third point.
This kind of stuff starts to matter a lot for eg. plural creatures using a single account. Discord requires PluralKit for this since discord does retroactively update them.
I think users should have full control over whether old messages/mentions/etc reference their display name and avatar at the time they sent it or retroactively changing it. I personally find a chat protocol that does not retroactively update my profile information to be completely unusable to me for various emotional reasons, but I accept that we should make it possible to avoid retroactive profile changes. I hope this can be done in a way that doesn't involve the room graph and its significant efficiency/usability disadvantages.
Tangentially, something my partner reminded me of after reading this: they attempted to use Matrix and a tool they wrote to update their display name/avatar as they switched, but found it completely jumbled the recency order of all of your rooms because of the room events.
I have an idea how to take care of both concerns. I ask for feedback, be it more social or technical considerations. However, such implementation as I propose here would require an external store for the profiles (e.g. new APIs or profile room).
(optional here means what I consider optional in reference of this proposal.)
Open questions to discuss:
Considerations
Considerations
(mostly from me now, I may add/ref points from others here)
Identifiers
Immutable (vs. Mutable) Profiles
Advantages (of Immutable)
Disadvantages (of Immutable)
Access Control
For Profile Rooms
If profile rooms may be used, this proposal has following advantages there:
How do you plan to make encrypted profiles work with SDKs or clients that dont support encryption (for technical reasons, such as not having a single f*ing clue how encryption works)?
Should i not be able to render a profile at all?
There is a lot going on here, so let us answer as best we can.
Encryption can be difficult, yeah, that's why it's best to use pre-existing libraries etc and don't necessarily try to do the cryptography on you&r own.
I would suggest that if you& can't figure out how to do a client that can do encryption then either ask for help from others or perhaps it might not be a good idea to make one especially since Matrix/Atoki relies on end-to-end encryption to some degree, so you& will always run into that problem.