jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.1k stars 83 forks source link

Username linking in (some) posts conflates multiple names with the same left-hand-side #546

Closed kvibber closed 1 year ago

kvibber commented 1 year ago

Under some circumstances, if a post lists multiple users who have the same username at different servers, all of them are linked to the last profile listed when viewed in Takahe.

I made a list of a bunch of my own accounts in a GoToSocial post. When viewed through Takahe, all three KelsonV usernames are linked to gts.keysmash.xyz instead of the first two being Wandering.shop and Pixelfed.social. Both ktv usernames are linked to mycrowd.ca instead of the first one to takahe.social.

Original post on GoToSocial: https://gts.keysmash.xyz/@kelsonv/statuses/01GW3RFPQ4E6ZTE31VME9Q83WG Viewed through Takahe: https://takahe.social/@kelsonv@gts.keysmash.xyz/posts/161221316797810360/

Akkoma and Mastodon link to the correct profiles when displaying the post.

Composing in Takahe or Mastodon didn't trigger the problem. Composing another test message in GoToSocial did. (Though I had to make sure I mentioned my Tahake username in the post, because following GTS from Takahe doesn't work yet)

This may be specific to GoToSocial and Takahe interacting with each other.

andrewgodwin commented 1 year ago

Ah yes - this is because our HTML parser falls back to the actual text and re-parses it for usernames, and GTS is using the same username text for different domains (we and mastodon will make the second username that's the same and onwards include the domain, I believe).

Hopefully it's a reasonably easy fix with our new HTML parser...

andrewgodwin commented 1 year ago

Fix is deployed on takahe.social and looks good now - thanks for the report!