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

Include user data in message data for non-pinging mentions #2126

Closed
advaith1 opened this issue Oct 4, 2020 · 2 comments
Closed

Include user data in message data for non-pinging mentions #2126

advaith1 opened this issue Oct 4, 2020 · 2 comments

Comments

@advaith1
Copy link
Member

advaith1 commented Oct 4, 2020

Description
For non-pinging mentions such as mentions in embeds and mentions suppressed with allowed_mentions, they are rendered properly when the user is cached, but otherwise the client just shows the <@id> format or @invalid-user. This is because non-pinging mentions do not include the user data in the mentions array for the message. On the Android app, it seems to always show @invalid-user for mentions suppressed with allowed_mentions, not even attempting to resolve from cache.

Why This is Needed
While allowed_mentions is an official feature, this often breaks mention rendering, which is a major issue if you want to intentionally send non-pinging mentions to see the user's data/profile.

Possible Solutions

  • If possible without causing pings, include the user data in the mentions array for non-pinging mentions
  • Add a new message property such as other_mentions with data for non-pinging mentions, and use those in rendering


image

@advaith1 advaith1 changed the title Include user data in mentions for non-pinging mentions Include user data in message data for non-pinging mentions Oct 4, 2020
@ghost
Copy link

ghost commented Oct 4, 2020

it may be more sensible to pass a "is_notified" flag in each object that is mentioned. If false, treat it as if it didnt mention anyone.

Since v8 isnt default yet, it would be an ideal time to do this as it is semi breaking.

@night
Copy link
Member

night commented Apr 9, 2021

We have no current plans to extend the message object to include non-mentioned users. While we display in the markdown a user as a mention, we do not parse and store these ignored mentions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants