fix logic arroudn accept/block contact and add unblock support #421
Merged
sarah
merged 3 commits from fixAcceptBlock
into master
5 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fixAcceptBlock'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/641
}
// Serialize transforms the AccessControl into json.
func (ac *AccessControl) Serialize() []byte {
this shouldn't be needed.
AccessControlList
already has aSerialize
andAcessControl
should never be serialized like this by itself.// BlockConversation looks up a conversation by `handle` and sets the Blocked ACL field to `true`
// This will cause Cwtch to never try to connect to and refuse connections from the peer
func (cp *cwtchPeer) BlockConversation(id int) error {
return cp.setACL(id, &model.AccessControl{Blocked: true, Read: false, Append: false})
block should not overwrite other flags.
// UnblockConversation looks up a conversation by `handle` and sets the Blocked ACL field to `true`
// Further actions depend on the Accepted field
func (cp *cwtchPeer) UnblockConversation(id int) error {
return cp.setACL(id, &model.AccessControl{Blocked: false, Read: false, Append: false})
unblock should not overwrite other flags.
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/643
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/645
return err
}
// p2p conversations have a single ACL referencing the remote peer. Set this to blocked...
comment is incorrect
869187c20e
to81095f7ade
5 months ago27438f0e6a
toe22bda5bc7
5 months agodb05f7d51c
into master 5 months agoReviewers
db05f7d51c
.