Skip to content

Mentions: inconsistent ActivityPub and site representation #1499

@jeherve

Description

@jeherve

Quick summary

In some of the ActivityPub representations, we display mentions as <a rel="mention" class="u-url mention" href="https://instance.tld/@example">@<span>example</span></a>. In others, we display the full account name: <a rel="mention" class="u-url mention" href="https://instance.tld/@example">@[email protected]</a>. It would be nice if we were consistent in all our implementations.

Similarly, in some situations we include the mention in the ActivityPub representation, but not on the site.

References

return \sprintf( '<a rel="mention" class="u-url mention" href="%s">@<span>%s</span></a>', esc_url( $url ), esc_html( $username ) );

foreach ( $this->extract_reply_context() as $acct => $url ) {
$mentions .= sprintf(
'<a rel="mention" class="u-url mention" href="%s">%s</a> ',

Steps to reproduce

  1. Write a new post, where you'll mention someone: @[email protected] hello there.
    • On the site, the mention will be displayed as <a rel="mention" class="u-url mention" href="https://mastodon.social/@pfefferle">@<span>pfefferle</span></a>
  2. Have that person reply to you ; their reply will appear as a comment.
  3. From your site's frontend, reply to them ; do not include any mention in the body of your comment.
    • You will not see any mention in the comment displayed on your site
    • The ActivityPub representation, however, will display <a rel="mention" class="u-url mention" href="https://mastodon.social/@pfefferle">@[email protected]</a>

Site owner impact

Between 20% and 60% of the total website/platform users

Severity

Minor

What other impact(s) does this issue have?

No revenue impact

If a workaround is available, please outline it here.

It would be nice if:

  • When a mention is included in the ActivityPub representation, it should also be visible on the site.
  • All mentions follow the same standard display. imo it should be <a rel="mention" class="u-url mention" href="https://mastodon.social/@pfefferle">@<span>pfefferle</span></a>, where the instance name is not displayed. This is the standard in use on Mastodon for example.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions