Skip to content

Fix Following status bug

feld requested to merge following-state-bug into develop

A long-standing elusive bug has been squashed!

All timeline filtering, rendering, etc relies on the data coming from the FollowingRelationship table.

I encountered the scenario where it says I'm following a user but I'm not receiving their posts. After debugging I discovered the issue is that the AccountView rendering of the relationship will use User.get_follow_state/3 to decide if the relationship is established. This function calls to ActivityPub.Utils.fetch_latest_follow/2 which will return the most recent Follow activity and checks the state of the relationship there.

However, there is a possible edge case where a Follow is accepted but a crash or something happens before the FollowingRelationship table is updated. This will cause the API to incorrectly report that you are following the user.

#2803 #3263

Edited by feld

Merge request reports

Loading