codl / migrannounce

https://migrannounce.tools.codl.fr/
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Don't message people already following the new account #9

Open codl opened 6 years ago

codl commented 6 years ago

[...] a feature where it doesn't dm people already following the new account

https://jorts.horse/@Authoritimmy/100911288699100410

codl commented 6 years ago

Ok so this sounds obvious and easy at first but it's non-trivial unless either the follower or the new account is on the same instance as the old account

Say the old account is old@old, the new one new@new, and a follower follower@follower. Follows don't federate, so old@old can't see if follower@follower follows new@new or not

As far as I am aware, there is no public API for getting follows/followers without authentication. Even if there is, we'd have to assume that follower or new is a mastodon (or compatible) server and not some random other AP implementation.

One way to find out would be to ask the user to also log into the new account but that's hella janky. Especially if the new account turns out to be on the same instance as the old one, as then the user would have to manually log out of the instance so they can log in again as another account.