isProbablyMastodonLink gets lots of false positives #10

Closed
opened 2025-08-01 15:28:24 +00:00 by rompe · 3 comments
Contributor

This function in Mastodon.ts falsely detects a lot of links as Mastodon user profiles because after matching against a positive and a negative list everythin else ist reported as a user profile. This could be done a bit more elegant by interpreting the url schema instead of looking for fixed substrings.

I will provide a pull request shortly.

This function in `Mastodon.ts` falsely detects a lot of links as Mastodon user profiles because after matching against a positive and a negative list everythin else ist reported as a user profile. This could be done a bit more elegant by interpreting the url schema instead of looking for fixed substrings. I will provide a pull request shortly.
Author
Contributor

Meanwhile I noticed that Pleroma and Pixelfed both use a URL scheme that's not as unique as Mastodon's and Friendica's:

https://server.tld/user

Adding this will lead to some false positives again.

Meanwhile I noticed that Pleroma and Pixelfed both use a URL scheme that's not as unique as Mastodon's and Friendica's: ``` https://server.tld/user ``` Adding this will lead to some false positives again.
Owner

Yeah, IMHO the correct way is to request a well-known file on such a server to sniff the software it is running... I'm not opposed to solution, just don't have the time to implement it.

Yeah, IMHO the correct way is to request a well-known file on such a server to sniff the software it is running... I'm not opposed to solution, just don't have the time to implement it.
Author
Contributor

That would lead to lots of needless requests. I think the best way would be to do both, so:

  1. check if the URL might be a Fediverse profile
  2. webfinger to be sure

I can look into ways to implement this.

That would lead to lots of needless requests. I think the best way would be to do both, so: 1. check if the URL **might** be a Fediverse profile 2. webfinger to be sure I can look into ways to implement this.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MapComplete/MastodonBot#10
No description provided.