MSC4427: Custom banners for user profiles - #4427
Conversation
There was a problem hiding this comment.
Implementation requirements:
- Client (sending)
- Client (rendering)
There was a problem hiding this comment.
Question, for an implementation to be valid...can it be one that is compatible but uses a different field?
I've just found out that Commet apparently implements this, with the same semantics, however uses chat.commet.profile_banner instead of eu.cyrneko.msc4427.banner / m.banner
I assume not, but I thought I'd ask just in case
There was a problem hiding this comment.
I've pushed a commit that makes the unstable prefix chat.commet.profile_banner
This means there is now two known implementations for this feature:
respective commits:
- Commet: commetchat/commet@95b69ff
- Sable: 7w1/sable@e4f5087
Both of these can set a banner as well as display it on profiles.
There was a problem hiding this comment.
Question, for an implementation to be valid...can it be one that is compatible but uses a different field?
Sure, as long as the spec your describing in this MSC matches an implementation it's valid. The reason for this check is to ensure that the proposal works and the field names do not need to align for that.
And there is precedence for using a existing field name as a unstable key 👍
There was a problem hiding this comment.
There was a problem hiding this comment.
Client implementation (Voyage):
from `eu.cyrneko.msc4427.banner_url` to `chat.commet.profile_banner`
|
|
||
| Clients can then use this field to load user banners. | ||
|
|
||
| ## Potential issues |
There was a problem hiding this comment.
Would we benefit from a recommendation for the banner dimensions or is this something you'd expect to work itself out organically across clients and users?
There was a problem hiding this comment.
I think this will probably end up being an implementation detail, though I feel guidelines around aspect ratio would make sense probably? Something along the lines of perhaps 1:√21 or another aspect ratio
Footnotes
-
okay, I admit, that's me being a nerd for DIN standard paper sizes. There isn't really necessarily a reason I suggest this ratio in particular ↩
There was a problem hiding this comment.
I can see the point on both to be honest. Mandating an aspect ratio is almost certainly going to be impossible, as clients require their own agency about how to display the banner.
That said, perhaps some wording that banners should be landscale an approximately 3:1 (clients MAY use techniques such as letterboxing or scaling if a banner doesn't fit)
There was a problem hiding this comment.
that sounds good! I'll add that to the doc
if I don't forget at least...
There was a problem hiding this comment.
I did, indeed, forget!
I'll set a reminder with a link to this...
|
(psst, you made the rendered link point to the first revision only) |
| "displayname": "Alice Margatroid", | ||
| "m.example_field": "custom_value", | ||
| "m.tz": "Europe/London", | ||
| "m.banner_url": "mxc://matrix.org/example123" |
There was a problem hiding this comment.
Perhaps it should be m.banner_uri instead, given this is a new field and it doesn't accept URLs (seemingly). Maybe it should also be noted that this must be an MXC URI.
There was a problem hiding this comment.
that checks out, actually; it wasn't intended that non-mxc-URIs are to be used here and I just wrote url from muscle-memory, I'll fix that in a little bit
There was a problem hiding this comment.
"url" is currently the standard in other places we have mxc's, e.g. avatar_url
There was a problem hiding this comment.
hm, that is true...but perhaps this should be changed for new fields...? either way I intend MXC URIs so I'll probably clarify that and push. (finally coming back to this)
There was a problem hiding this comment.
avatar_url does not support arbitrary URLs either, it mandates MXC URIs, yet it is labeled avatar_url
There was a problem hiding this comment.
I believe url in places that only accept MXC URIs is due to the fields previously accepting URLs, however I haven't verified this. Correction appreciated.
There was a problem hiding this comment.
@velikopter no thats not the case
There was a problem hiding this comment.
The sauce gets saucier. The spec doesn't mandate avatar_url being an MXC URI in all places.
For example:
There was a problem hiding this comment.
The sauce gets saucier. The spec doesn't mandate
avatar_urlbeing an MXC URI in all places.For example:
1.  https://spec.matrix.org/v1.19/client-server-api/#mroommember 2.  https://spec.matrix.org/v1.19/client-server-api/#get_matrixclientv3roomsroomidjoined_members
This is a documentation issue, for privacy reasons non-MXC URLs must NOT be fetched by client. You can refer to matrix client implementations for that
There was a problem hiding this comment.
I'll leave it as URL and keep the warning for implementers to only load MXC:// URIs in
oops, totally missed that, but it's fixed now, ty! |
|
@cyrneko consider reverting url -> uri, url matches similar syntax elsewhere, namely avatar_url on rooms and memberships. I think that even if uri is pedantically correct it would be better to adhere to pre-established stylistic choices that exist in the spec |
I had initially done this to try and be "correct", but perhaps changing existing norms in the spec is outside the scope of this MSC, and I should just stick to existing norms.
|
@catfromplan9 done. |
|
smh the spellcheck still thinks |
|
Is this also supported per-room (as in, on join events)? |
Not through join events, only maybe through things such as MSC4144, but that is out-of-scope for this MSC. |
Why not |
|
I implemented the |
|
Should also be kept in mind that profile lookup over federation may be disabled. If this is the case, then the only way a banner could be visible is to support it on |
|
hm, I'm not sure if this MSC should be the one to introduce that, I did initially just want to standardize existing behavior based on extended profile data, I am also not aware of the specifics of that mechanism so I'd have to read the spec for that part first, but that's the lesser of my worries Footnotes
|
Well what I mean is, if profile lookups are disabled on the homeserver then you rely on member state events. You could leave propagation of the state event up to the client (meaning no server side change is necessary) so all you'd have to do is add a section about them being defined first by per-room m.room.member state events This lets you have per-room banners supported, and if you want then you don't need to propagate it into all the rooms when changed on your client (if you assume your userbase is on servers with profile lookup enabled) |
matrix-org#4427 (comment) Co-authored-by: Tulir Asokan <tulir@maunium.net>


Rendered
Signed-off-by: Alexia cyrus42@disroot.org