Skip to content

Feature: linking display names when mentioned and when sending a message #37

@scoates

Description

@scoates

In the room message input when I press @, I would like it to pop up a list of users in the room. @s would filter to users with a display name starting with s, @se with se etc. It looks like there's a facility in the message structure to add a mentioned name.

Similarly when displaying messages, it would be nice to link the username. It looks like Element (or maybe Element X) handles this in a strange way where it's linked in the HTML but not the markdown, so this might get messy, though maybe a simple heuristic could be used to try to match a message starting with the display name(s) of users referenced in m.mentions.

Sample source (mine, in #Mactrix) attached:

{
  "type": "m.room.message",
  "sender": "@sean:matrix.scoates.net",
  "content": {
    "msgtype": "m.text",
    "body": "Viktor Strate: I've got a bunch of issues I've noticed that I'd like to work on, but juggling them as post-it notes on my desk is probably bad for everyone. If I create issues for them, I don't want it to seem like I'm demanding fixes; just noting deficiencies that could be worked on (and I'd do work to resolve them, too). Is that in line with how you'd like to handle issues in this project? (Really don't want to seem like I'm flooding, but really do want to track this stuff.)",
    "format": "org.matrix.custom.html",
    "formatted_body": "<a href=\"https://matrix.to/#/@viktorstrate:qpqp.dk\">Viktor Strate</a>: I've got a bunch of issues I've noticed that I'd like to work on, but juggling them as post-it notes on my desk is probably bad for everyone. If I create issues for them, I don't want it to seem like I'm demanding fixes; just noting deficiencies that could be worked on (and I'd do work to resolve them, too). Is that in line with how you'd like to handle issues in this project? (Really don't want to seem like I'm flooding, but really do want to track this stuff.)",
    "m.mentions": {
      "user_ids": [
        "@viktorstrate:qpqp.dk"
      ]
    }
  },
  (CHOPPED HERE)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions