From c3a830628a24f4599f5d3f2f08b4dbdd112daa96 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sun, 19 Dec 2021 15:01:21 -0500 Subject: [PATCH 1/2] create new conversation on unknown accept --- peer/cwtch_peer.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 1cc0081..17f8b67 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -1169,6 +1169,13 @@ func (cp *cwtchPeer) eventHandler() { } } case event.PeerStateChange: + handle := ev.Data[event.RemotePeer] + if connections.ConnectionStateToType()[ev.Data[event.ConnectionState]] == connections.AUTHENTICATED { + _, err := cp.FetchConversationInfo(handle) + if err != nil { + cp.NewContactConversation(handle, model.DefaultP2PAccessControl(), false) + } + } cp.mutex.Lock() cp.state[ev.Data[event.RemotePeer]] = connections.ConnectionStateToType()[ev.Data[event.ConnectionState]] cp.mutex.Unlock() From ee4437efe8aafe263974f58809c2eba1e1b6caa2 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sun, 19 Dec 2021 15:28:38 -0500 Subject: [PATCH 2/2] import legacy profile errs to debug --- peer/cwtch_peer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 17f8b67..99aa5f9 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -333,7 +333,7 @@ func ImportLegacyProfile(profile *model.Profile, cps *CwtchProfileStorage) Cwtch zone, path := attr.ParseZone(parts[1]) cp.SetScopedZonedAttribute(scope, zone, path, v) } else { - log.Errorf("could not import legacy style attribute %v", k) + log.Debugf("could not import legacy style attribute %v", k) } } @@ -364,7 +364,7 @@ func ImportLegacyProfile(profile *model.Profile, cps *CwtchProfileStorage) Cwtch case lastKnownSignature: cp.SetConversationAttribute(conversationID, attr.LocalScope.ConstructScopedZonedPath(attr.ProfileZone.ConstructZonedPath(lastReceivedSignature)), value) default: - log.Errorf("could not import conversation attribute %v", key) + log.Debugf("could not import conversation attribute %v", key) } }