fix logic arroudn accept/block contact and add unblock support #421
No reviewers
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#421
Loading…
Reference in New Issue
No description provided.
Delete Branch "fixAcceptBlock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/641
@ -14,2 +14,4 @@
}
// 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.@ -501,1 +503,4 @@
// 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.
@ -502,0 +509,4 @@
// 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
@ -508,1 +533,4 @@
return err
}
// p2p conversations have a single ACL referencing the remote peer. Set this to blocked...
comment is incorrect
869187c20e
to81095f7ade
27438f0e6a
toe22bda5bc7