Previously we added a peer to the database before successfully completing an sbot follow and removed a peer from the database before successfully completing an unfollow.
This PR reverses the order:
When a subscription event is received via the UI:
Check the follow status
Follow if not following
Add peer to database
When an unsubscription event is received via the UI:
Check the follow status
Unfollow if following
Remove peer from database
Both follow_if_not_following() and unfollow_if_following() now return Result<(), String> so we can match on the result in src/routes.rs.
Previously we added a peer to the database before successfully completing an sbot follow and removed a peer from the database before successfully completing an unfollow.
This PR reverses the order:
When a subscription event is received via the UI:
1. Check the follow status
2. Follow if not following
3. Add peer to database
When an unsubscription event is received via the UI:
1. Check the follow status
2. Unfollow if following
3. Remove peer from database
Both `follow_if_not_following()` and `unfollow_if_following()` now return `Result<(), String>` so we can match on the result in `src/routes.rs`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Previously we added a peer to the database before successfully completing an sbot follow and removed a peer from the database before successfully completing an unfollow.
This PR reverses the order:
When a subscription event is received via the UI:
When an unsubscription event is received via the UI:
Both
follow_if_not_following()andunfollow_if_following()now returnResult<(), String>so we can match on the result insrc/routes.rs.