Migration to follow table restores follow relationships broken by blocks
In the migration to a follow table, possibly-lost follows are restored by going through the stored Follow
activities, on the basis that they contain a state
attribute which is updated whenever a request is accepted, rejected or cancelled.
However, in Pleroma, when a user A blocks an user B, the follow relationship is removed both ways, but only the Follow activities from A to B are updated, meaning that the migration restores B to A follow relationships purposefully broken by a block.
I believe this could be fixed by the following algorithm:
- find the last block activity for every person A blocking a person B
- unless there is an accepted Follow activity from B to A that is more recent than this activity, unfollow