Icons for Matrix conversations
Categories
(Chat Core :: Matrix, enhancement)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: clokep, Assigned: clokep)
References
Details
Attachments
(3 files, 3 obsolete files)
Matrix supports icons for any type of conversation, unfortunately the chat framework only supports buddy icons (e.g. icons for individual conversations, not chats).
We should:
- Extend the backend to support icons for any type of conversation.
- Pass through the icons from Matrix for all conversations.
Note that we currently support icons in tooltips, so there's already some code to retrieve / parse icons from the matrix-js-sdk.
Assignee | ||
Comment 1•4 years ago
|
||
- Allow conversations (both chat or IM) to set an icon. (IM conversations fallback to the buddy icon.)
- Implement using the
m.room.avatar
for Matrix conversations, if available.
With this change there's a few states the image can be in:
- Chat conversations:
- No icon if the chat has no icon.
- An icon if the chat has an icon set (currently this is only for Matrix, I don't think any other protocols implement this).
- IM conversations:
- An icon from the conversation, if one is set. (Matrix can override the icon that's used.)
- The icon from the buddy object, if one exists.
- The fallback icon (showing the outline of a human).
No icon vs. the fallback is set by using null vs. an empty string which I don't really love. I wonder if it would be nicer to have a different fallback icon for chats?
Assignee | ||
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Should this mention the null vs. empty behavior?
I was actually hoping to push this behavior into the UI layer for that to decide about whether it should show the fallback based on the type of conversation, but it seems like the right info might not be available when necessary to show that... Maybe I'll do that as a separate patch.
Assignee | ||
Comment 5•4 years ago
|
||
This is a pretty big update that:
- Correctly sets the size each time we pull Matrix avatars.
- Removes unused code from an older version of this patch.
- Pushes the null vs. undefined vs. "" behavior into the UI by telling it directly whether to use a fallback icon.
- Supports tooltips.
- Unbitrots / rebases.
Comment 6•4 years ago
|
||
Assignee | ||
Comment 7•4 years ago
|
||
If you make this aParticipant?.buddyIconFilename this also fixes the tooltip bug with missing participants in scrollback.
Is there a separate bug filed about this?
as an aside, should we be respecting dpi scaling?
Probably, but I think that's a bit orthogonal to this. Can we file a separate issue about that? (It also applies to other protocols most likely?)
I think I hit the other comments!
Comment 8•4 years ago
|
||
Comment 9•4 years ago
|
||
(In reply to Patrick Cloke [:clokep] from comment #7)
If you make this aParticipant?.buddyIconFilename this also fixes the tooltip bug with missing participants in scrollback.
Is there a separate bug filed about this?
I don't think so.
as an aside, should we be respecting dpi scaling?
Probably, but I think that's a bit orthogonal to this. Can we file a separate issue about that? (It also applies to other protocols most likely?)
Sure, will do. Though I think Matrix is the only one that can control the size, it seems XMPP just has a base64 encoded image in the vCard.
Assignee | ||
Comment 10•4 years ago
|
||
Thank you for the reviews!
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
(currently this is only for Matrix, I don't think any other protocols implement this).
Martin had pointed out a proto-XEP for XMPP for this: https://xmpp.org/extensions/inbox/muc-avatars.html if this gets standardized we should be able to add support easily, but seems too early still. Wanted to include it for posterity though.
Comment 12•4 years ago
|
||
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/d825d65d09eb
Use conversation icons for Matrix. r=freaktechnik
Updated•4 years ago
|
Updated•3 years ago
|
Description
•