remove unused events (libcwtch-rs audit); add anti dup on import #449
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#449
Loading…
Reference in New Issue
No description provided.
Delete Branch "cleanAndNoDupImport"
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: failure
https://build.openprivacy.ca/cwtch.im/cwtch/820
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/822
@ -483,8 +483,14 @@ func (cp *cwtchPeer) ImportGroup(exportedInvite string) (int, error) {
return -1, err
}
cp.mutex.Lock()
conversationInfo, err := cp.storage.GetConversationByHandle(gci.GroupID)
ineffectual err assignment?
@ -486,0 +486,4 @@
conversationInfo, err := cp.storage.GetConversationByHandle(gci.GroupID)
if conversationInfo != nil {
cp.mutex.Unlock()
return -1, err
this err is incorrect, should create a new error using fmt.Errorf etc.
@ -506,0 +512,4 @@
cp.eventBus.Publish(event.NewEvent(event.ContactCreated, map[event.Field]string{event.ConversationID: strconv.Itoa(conversationID), event.RemotePeer: handle}))
return conversationID, err
}
return -1, err
err will be nil, should create a new error here fmt.Errorf("contact with handle already exists...")
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/826