Add unfollow and unblock methods #34

Merged
glyph merged 2 commits from unfollow_and_unblock into main 2022-03-03 08:17:07 +00:00
Owner

Since I'm currently adding the ability to unfollow or unblock a peer in Peachland, this seemed like a good time to add convenience methods.

I noticed that set_relationship was being unnecessarily noisy, in the sense that it was publishing values that were not technically required (ie. blocking: false when calling follow(peer_id)). I have updated that method to take Option<bool> for following and blocking, instead of simply bool.

unblock(peer_id)

This is a convenience method to publish a contact message with blocking: false.

unfollow(peer_id)

This is a convenience method to publish a contact message with following: false.

Since I'm currently adding the ability to unfollow or unblock a peer in Peachland, this seemed like a good time to add convenience methods. I noticed that `set_relationship` was being unnecessarily noisy, in the sense that it was publishing values that were not technically required (ie. `blocking: false` when calling `follow(peer_id)`). I have updated that method to take `Option<bool>` for `following` and `blocking`, instead of simply `bool`. `unblock(peer_id)` > This is a convenience method to publish a contact message with blocking: `false`. `unfollow(peer_id)` > This is a convenience method to publish a contact message with following: `false`.
glyph added 1 commit 2022-03-01 12:24:20 +00:00
glyph added 1 commit 2022-03-01 13:42:54 +00:00
glyph merged commit 9ad38fb0e8 into main 2022-03-03 08:17:07 +00:00
glyph deleted branch unfollow_and_unblock 2022-03-03 08:17:08 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 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: golgi-ssb/golgi#34
No description provided.