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

Use most recent username or display name when unwrapping mention tags #6906

Closed
acelaya opened this issue Mar 18, 2025 · 0 comments · Fixed by #6908
Closed

Use most recent username or display name when unwrapping mention tags #6906

acelaya opened this issue Mar 18, 2025 · 0 comments · Fixed by #6908
Assignees

Comments

@acelaya
Copy link
Contributor

acelaya commented Mar 18, 2025

When unwrapping a mention tag into its plain-text form, we are always using the mention tag value:

  • <a data-hyp-mention="" data-userid="acct:username@authority">@username</a> -> @username
  • <a data-hyp-mention="" data-userid="acct:username@authority">@Display Name</a> -> @[Display Name]

However, this can cause the plain-text version to be outdated if either of those values has changed.

Instead, we should cross-reference the annotation tags with the entries in annotation.mentions, so that we can unwrap to the most recent username or display name, ensuring a valid mention is generated when wrapping them back into a mention tag.

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

Successfully merging a pull request may close this issue.

1 participant