Closed Bug 1347533 Opened 4 years ago Closed 7 months ago

Show room names instead of room IDs

Categories

(Chat Core :: Matrix, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Instantbird 77

People

(Reporter: matrixisreal, Assigned: khushil324)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

Currently, The conv name is just set to Room Alias(Address) or RoomId, depending on what joinRoom is called.

The roomId shouldn't be displayed to the user.

The room name, room alias, room unique address(#server_#name:matrix.org) should always be provided.
Can you give examples of what each of these things are? (Or link to documentation explaining the differences.)
Room Obj has the fields:

Name 	Type 	Description
roomId 	string 	The ID of this room.
name 	string 	The human-readable display name for this room.
etc.

roomId:
its of the form: 
        !opaque_id:domain
See : https://matrix.org/docs/spec/intro.html#room-structure

name:
its just the name of the Room. And this is what we want to display on the main Conv.
    
Aliases : 
A room may have zero or more aliases. A room alias has the format:
   #room_alias:domain
See: https://matrix.org/docs/spec/intro.html#room-aliases

Address:
This is not defined in the docs. And I have no idea if there is a way to fetch this from the Room Object.
and it uniquely identifies the room.
Example: #mozilla_#instantbird:matrix.org.
Depends on: 1589552
Summary: Give better Room Info to the user. → Show room names instead of room IDs

Generally, other clients proceed more or less as indicated in the specification:

  • If m.room.name is set, display that one
  • Otherwise, display the name of the participants inside as room name (useful for direct chats). The server provides those in m.heroes

The aliases are "pointers" that can be used to join that room from any homeservers that registers one. There is usually one "cannonical" alias, chosen by the room admin, that can be used to share that room with others. The spec says they are preferred over displaying participants, but I have never seen this in practice (probably because room names tend to be set before aliases, and public rooms generally have both).

Attached patch WIP v1 (obsolete) — Splinter Review

Attaching a WIP I had for this.

Patrick, I want to take this and continue the work. Should I?

(In reply to Khushil Mistry [:khushil324] from comment #5)

Patrick, I want to take this and continue the work. Should I?

Hey Khusil, sorry for the delay this got lost in my bugspam. Feel free to take a look at this and let me know if you have questions! I believe that bug 1589552 needs to be fixed first.

Assignee: nobody → khushil324
Attachment #9124706 - Attachment is obsolete: true
Attachment #9133378 - Flags: review?(clokep)
Status: NEW → ASSIGNED
Attachment #9133378 - Attachment is obsolete: true
Attachment #9133378 - Flags: review?(clokep)
Attachment #9133379 - Flags: review?(clokep)

You need to apply the patch from Bug 1589552 first.

Attachment #9133379 - Attachment is obsolete: true
Attachment #9133379 - Flags: review?(clokep)
Attachment #9133513 - Flags: review?(clokep)

This partially works -- it shows room names for channels with names, but it still shows the ID for private conversations.

It also oddly shows a different result than Riot for the #test:matrix.org (Riot shows "#test:matrix.org", Thunderbird with this patch shows "#test aka #freenode_#matrix-test").

I think the logic discussed in comment 3 needs to be implemented, although I'm kind of surprised the SDK doesn't do it for us?

Attachment #9133513 - Flags: review?(clokep) → review-

Apply patch from bug 1348038 first.
Just small change:
conv._name = room.summary.info.title;
SDK is setting this from its side and we can use it.

Attachment #9133513 - Attachment is obsolete: true
Attachment #9134475 - Flags: review?(clokep)
Attachment #9134475 - Flags: review?(clokep) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9ee88b4972cc
Show room names instead of room IDs in Matrix. r=clokep

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → Instandbird 77
You need to log in before you can comment on or make changes to this bug.