Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for @role mentions pinging Matrix users #174

Open
axiopaladin opened this issue Feb 28, 2025 · 0 comments
Open

Support for @role mentions pinging Matrix users #174

axiopaladin opened this issue Feb 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@axiopaladin
Copy link

axiopaladin commented Feb 28, 2025

Description

Using the m.mentions property of a message, it should be possible for the bridge to make messages that have inserted a @role (on the discord side of bridge) to "ping" matrix users that are part of that group.

Example

Consider the discord role @admins, which includes users Alice and Bob. Currently, the message content may look like this after bridging to matrix:

"content": {
    "body": "pinging @admins",
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "formatted_body": "pinging <font color=\"#123456\"><strong>@admins</strong></font>",
    }

Alice has the matrix account @alice:example.org and is logged into the bridge for double-puppeting. Bob is not logged into the bridge, so mautrix has created a pseudo-user for his messages with the username @discord_0123:example.org. When a bridged discord message includes a valid @admins ping, this feature request suggests that the bridge should append the m.mentions property to the message event payload, like so:

"content": {
    "body": "pinging @admins",
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "formatted_body": "pinging <font color=\"#123456\"><strong>@admins</strong></font>",
+   "m.mentions": {
+       "user_ids": ["@alice:example.org", "@discord_0123:example.org"]
+   }
}

(While the @discord_0123:example.org user doesn't have any need to be included in the mention, since it is an unmonitored account, it is shown here for clarity. In practice, it may be pruned to reduce message size.)

@axiopaladin axiopaladin added the enhancement New feature or request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant