element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
70 stars 12 forks source link

Support for per-room display names/avatars #499

Open richvdh opened 7 years ago

richvdh commented 7 years ago

Client-side support for https://github.com/matrix-org/matrix-doc/issues/545

Vetgans commented 7 years ago

I second this request for choosing a displayname per room.

In https://matrix.org/jira/browse/SPEC-230 it’s given ‘not high priority’. One of the key features of Matrix however is to bridge networks and combine things. Many people use different (nick)names and aliases on different networks, fora and so on. People often (obligatory) use surnames for work, but first names to communicate with family and friends.

So shouldn’t this request get a (much) higher priority?

ara4n commented 7 years ago

the priority here is basically "not high relative to stuff like e2e". it's prolly somewhere between p2 and p3; will put it as p2 for now.

JasonLocklin commented 7 years ago

Per-group nicks, rather than per-channel, would make more sense, when groups are done. It makes more sense in terms of UX -both for the user (i.e., keeping track of the fact that I use one display name for work, another for family, etc. is easy), and for the user's contact (Joe at work will always see my work display name, no accidentally using the wrong display name in one odd channel). The UI for managing these multiple display names could easily be worked seamlessly into whatever UI is created for managing group subscriptions.

uhoreg commented 7 years ago

dup of matrix-org/matrix-spec-proposals#838

heyakyra commented 6 years ago

Would this give the illusion that the different nicks are separate? i.e. offer anonymity? If so may conflict with vector-im/element-web#5216

t3chguy commented 6 years ago

@thekyriarchy it's not intended for that whatsoever since the MXID will not change, just the display name will, so I presume more for differing preferred name/known as name in different groups/circles

jooert commented 6 years ago

If someone is interested in updating their displayname in certain rooms manually, I wrote a small Python script to do this.

t3chguy commented 6 years ago

If you're using riot Web it's possible to do roughly scripts. See https://vault.webdevguru.co.uk/Matrix/per-room-nickname/

t3chguy commented 6 years ago

If you're using riot Web it's possible to do roughly scripts. See https://vault.webdevguru.co.uk/Matrix/per-room-nickname/

t3chguy commented 6 years ago

If you're using riot Web it's possible to do roughly scripts. See https://vault.webdevguru.co.uk/Matrix/per-room-nickname/

the-moog commented 5 years ago

In a self-hosted home server local rooms may be OK with a recognisable name as the users may know each other within their organisation, but rooms federated into that homeserver perhaps not so. Could there be a setting as simple as "Homeserver Name" "Federated Alias"?

lomax commented 5 years ago

Why don't just add the scope, i.e current room, to the existing /nick command in Riot? Or even better add this functionality to /nick clone /localnick or /roomnick or /displayname.

To be specific roomId could be passed to setDisplayName, and setDisplayName could pass name to the _membershipChange based on roomID status. Any takers @ara4n?

fladd commented 5 years ago

Now that we have this for rooms, it would be great to also have this for communities. Such that if someone starts a new chat with me, they will see my community name in those new rooms as well, and not my general one.

t3chguy commented 5 years ago

@fladd

Now that we have this for rooms, it would be great to also have this for communities. Such that if someone starts a new chat with me, they will see my community name in those new rooms as well, and not my general one.

The issue there is a room can be in 0-N communities, so what if Room X is in 100 communities, which Display Name do we use?

fladd commented 5 years ago

@fladd

Now that we have this for rooms, it would be great to also have this for communities. Such that if someone starts a new chat with me, they will see my community name in those new rooms as well, and not my general one.

The issue there is a room can be in 0-N communities, so what if Room X is in 100 communities, which Display Name do we use?

The nickname that was last set and affected that room.

fladd commented 5 years ago

To elaborate on this:

Suppose you have Rooms X and Y, and communities 1 and 2: 1(X,Y) 2(Y)

If I now change nickname in community 1, then it is also changed in X and Y. If I then change it directly in X, then is is changed only there. If I then change nickname in community 2, then room Y is changed.

Changing community nickname should also affect the community user list, and any new (1to1) room that is created from within a community. That is, the nickname should be inherited.

t3chguy commented 5 years ago

and any new (1to1) room that is created from within a community.

will probably be the trickiest, as starting a 1:1 with someone in a community is no different than starting one with someone manually, so there's no way for anything to know that it should pick up that name

fladd commented 5 years ago

There is a list with user names on the community page. If you start a chat from that list I meant. Otherwise, the 1to1 chat should of course just inherit the nickname from the room you started the chat from (if started from a room; otherwise default nickname).

t3chguy commented 5 years ago

There is a list with user names on the community page. If you start a chat from that list I meant. Otherwise, the 1to1 chat should of course just inherit the nickname from the room you started the chat from (if started from a room; otherwise default nickname).

I know what you mean, but when you start a chat with that list there's no special API for starting a chat in a community/room, its just create a room and invite the other user, the other user then chooses their display name and have no idea what screen you were looking at in your client when you were starting the chat.

fladd commented 5 years ago

mmh, I see. That unfortunately makes the feature of setting room-based nicknames not very useful.

dessalines commented 5 years ago

Matrix communities just being a collection of random rooms, is totally different from discord communities, where the rooms are owned, and specific to that community.

So with discord you can do things like have a name per community, limit access and abilities by roles, etc. Whereas in matrix you have to do this for every room... which is more work, but it makes sense when you consider that one room can be a part of many communities.

I will say tho that it is easier to "onboard" ppl the discord way, but its def less flexible and normalized. A good compromise might be a way to mass invite ppl to all the rooms in a community, if they're private for example, and a /communitynick command that could search for your user thats in all the rooms of that community, and rename you in them.

alittlebitofit commented 5 years ago

@t3chguy

If you're using riot Web it's possible to do roughly scripts. See https://vault.webdevguru.co.uk/Matrix/per-room-nickname/

This works. Thanks. Is there anything similar for display pictures? :)

t3chguy commented 5 years ago

@t3chguy

If you're using riot Web it's possible to do roughly scripts. See https://vault.webdevguru.co.uk/Matrix/per-room-nickname/

This works. Thanks. Is there anything similar for display pictures? :)

The same thing except you update the avatar_url instead

alittlebitofit commented 5 years ago

The same thing except you update the avatar_url instead

It isn't working. I tried using this image.

https://images.pexels.com/photos/158056/water-mountain-moon-river-158056.jpeg

It just says: "alittlebitofit changed their profile picture" but doesn't actually show the picture.

anoadragon453 commented 5 years ago

You need to use an mxc:// URL. You can get one by uploading that image in some room then clicking "View Source" on the image message. Then under content->file->url there should be an mxc://... URL. Copy and use that as the value for avatar_url.

alittlebitofit commented 5 years ago

You need to use an mxc:// URL. You can get one by uploading that image in some room then clicking "View Source" on the image message. Then under content->file->url there should be an mxc://... URL. Copy and use that as the value for avatar_url.

Under "View Source", you need to check for content->url, there's no file thing in between. Although its working, but why do I need the mxc:// URL? And btw what does 'mxc' stand for?

alittlebitofit commented 5 years ago

content->file->url is under "View Decrypted Source", meaning that the image is in an encrypted room. And that particular image has no url under "View Source".

Also I found multiple urls under "View Decrypted Source", I tried them all, and riot simply says alittlebitofit changed their profile picture but I see nothing changed.

So the only solution that seemed to work was to upload the image in an "unencrypted" room which I did not want to, yet I tried. And it worked. But later when I deleted that image from the (unencrypted) room, my profile picture disappeared.

So here I am again, back to square 1 😅.

t3chguy commented 5 years ago

@alittlebitofit mxc stands for matrix content, it is a file that is uploaded to a matrix server and available for other servers in the federation to access. Riot mandates mxc for all shared images it loads to protect your privacy, if it allowed any image then that image would be loaded directly and thus your ip address would be leaked. Mxc also somewhat prevents that resource going offline as it is federated amongst multiple hosts

t3chguy commented 5 years ago

If you upload the image in an encrypted room then the file gets encrypted then uploaded, the decryption key is shared in the message alongside the mxc url. If you use that mxc url for your avatar then no one will have that decryption key and thus it won't work

alittlebitofit commented 5 years ago

Oh so I need to keep the picture in the unencrypted room? I can't delete and still retain the profile picture?

Also I am in an encrypted room where there's only me. I tried uploading the image there and it's still not working for that particular room. Since I am alone in the room, it should work, shouldn't it?

t3chguy commented 5 years ago

If the image gets encrypted then using it for your avatar will not associate the decryption keys with it so no one will be able to see it. It's like you encrypting it locally using some tool then sharing it and expecting it to be visible for everyone, without them knowing the description key and decrypting it it won't work. User and room avatars do not support encrypted files

anoadragon453 commented 5 years ago

Although if we do implement per-room avatars as a proper feature that would be a really nice thing to add :)

On May 11, 2019 8:31:07 AM UTC, Michael Telatynski notifications@github.com wrote:

If the image gets encrypted then using it for your avatar will not associate the decryption keys with it so no one will be able to see it. It's like you encrypting it locally using some tool then sharing it and expecting it to be visible for everyone, without them knowing the description key and decrypting it it won't work. User and room avatars do not support encrypted files

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/vector-im/riot-web/issues/2458#issuecomment-491491603

alittlebitofit commented 5 years ago

No I meant, when I am alone in the room, it should at least change for at least me, right?

t3chguy commented 5 years ago

If it the file gets encrypted then no. Because encrypted avatars are not supported.

anoadragon453 commented 5 years ago

Nah, since as @t3chguy said, it's not associated with the keys to decrypt that content.

So while you can see it as part of a message, when Riot loads in the image for your avatar it doesn't expect an encrypted image, and thus doesn't try to decrypt it. Thus nothing shows.

It's definitely technically possible to do this, but here we are doing things that aren't actually features yet so we can't expect everything to work :)

If you're worried about the contents of the image being leaked to the server admin, either run your own server or find a community one that may not care about it. Make an account, upload the image, then take the resulting mxc URL.

That being said, encrypted avatars is a cool idea, and may be worth creating a proposal for it.

alittlebitofit commented 5 years ago

Thanks so much @t3chguy and @anoadragon453 for your kind responses. :)

So in the end, I need to "keep" the image in the unencrypted room if I want my profile picture to be available for the intended.

I'll see on the proposal part sometime later.

Thanks again :)

anoadragon453 commented 5 years ago

You're welcome! Let us know if you have any more questions :)

You can also contact me on Riot/Matrix as @andrewm:amorgan.xyz.

toger5 commented 5 years ago

So multiple display names would also be linked to different profile pictures (basically having display profiles)? And another cool thing would be having a profile picture history like in telegram?

trosel commented 4 years ago

My understanding of the Matrix spec is that a user is literally just a matrix identifier. Any additional data or schema is handled in the given server implementation.

So couldn't synapse have a user schema and give each user an array of nicknames per room and then dendrite could just have no nickname option?

Mikaela commented 4 years ago

I think this could be closed as there are /myroomnick and /myroomavatar

aaronraimist commented 4 years ago

Well things like https://github.com/vector-im/riot-web/issues/11293 aren’t fixed yet. Also it would be nice if there was some UI for it. Especially setting your room avatar so you didn’t have to go through the dance of getting a mxc url.

t3chguy commented 4 years ago

You don't have to, if you omit the mxc url it gives you a file upload dialog.

t3chguy commented 4 years ago

But yes an actual ui would be nice

jtrees commented 4 years ago

I think the way to go here is either...

Lalarian commented 3 years ago

Such a feature is simply obligate! Any messenger offers the option for renaming contacts to be shown with the name you want to find them under. It's not a minor thing, but actually very important, especially if you got multiple contacts with similar names.

t3chguy commented 3 years ago

@Lalarian

This issue is about you having a different avatar & displayname per room. As in one you set in that room.

The issue you want is https://github.com/vector-im/element-meta/issues/725

HarHarLinks commented 3 years ago

I want to add my suggestions of some design and implementation thoughts to this thread now that t3chguy pointed me here.

My suggestion goes into more detail that includes proposals for changes in spec and server and can be found at vector-im/element-meta#370, but let me summarize the element part here:

Again, find more details and reasoning at vector-im/element-meta#370.

Lalarian commented 3 years ago

I hope this will make it onto the roadmap soon. It's obligate for direct messaging purposes.

blueforesticarus commented 3 years ago

I second Lalarian's point. I want a username for talking is discord-like rooms, but I need to have my display-name be my name for talking to family.

akien-mga commented 3 years ago

I thought for years that this wasn't possible due to this issue, but for others coming here: you can now set a custom nick on a per-room basis with the /myroomnick (also aliased to /roomnick) command in Element Web at least.

It doesn't allow you to set a custom nick upon joining a room if you want to keep your identities well separated, but for the use case of "Internet persona vs first name in family room", you can likely have your Internet persona as default nick and change it specifically in your family rooms my /myroomnick).