Skip to content

ForceMentionsInContent: fix double mentions for Mastodon/Misskey posts

Zero requested to merge zero/pleroma:double_mentions into develop


  • Adding a changelog: In the changelog.d directory, create a file named <code>.<type>.

This one stumped me for a bit, I kept seeing double mentions from Mastodon and sometimes Misskey.
After I added a bunch of Logger statements and let it print data for a bit, I realized why it was happening.

The code was checking for api_id to not add duplicated mentions, but in those they look like that:
Misskey: https:///

So it was never going to match.
My fix was to also check the uri, because that matches the mention format from Mastodon and Misskey.

Merge request reports