Update Cwtch
continuous-integration/drone/pr Build is pending Details

This commit is contained in:
Sarah Jamie Lewis 2023-04-20 15:28:28 -07:00
parent 131e08ccee
commit 110d58f521
3 changed files with 4 additions and 33 deletions

2
go.mod
View File

@ -3,7 +3,7 @@ module git.openprivacy.ca/cwtch.im/cwtch-autobindings
go 1.19
require (
cwtch.im/cwtch v0.20.1
cwtch.im/cwtch v0.20.2
git.openprivacy.ca/cwtch.im/server v1.4.5
git.openprivacy.ca/openprivacy/connectivity v1.8.7
git.openprivacy.ca/openprivacy/log v1.0.3

4
go.sum
View File

@ -1,6 +1,6 @@
cwtch.im/cwtch v0.18.0/go.mod h1:StheazFFY7PKqBbEyDVLhzWW6WOat41zV0ckC240c5Y=
cwtch.im/cwtch v0.20.1 h1:mE+Epocy/8sH7TxDcNmHQYkptqy/aNG7eiDspZYmrKM=
cwtch.im/cwtch v0.20.1/go.mod h1:h8S7EgEM+8pE1k+XLB5jAFdIPlOzwoXEY0GH5mQye5A=
cwtch.im/cwtch v0.20.2 h1:ZE/HhkwAIzMEoWwaCYjGfM2vrr7voB6vwIW5wMaVmQE=
cwtch.im/cwtch v0.20.2/go.mod h1:h8S7EgEM+8pE1k+XLB5jAFdIPlOzwoXEY0GH5mQye5A=
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek=
filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=

View File

@ -522,35 +522,6 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
return ""
}
contactStateCache[ev.Event.Data[event.RemotePeer]] = cxnState
case event.NewRetValMessageFromPeer:
// auto handled event means the setting is already done, we're just deciding if we need to tell the UI
onion := ev.Event.Data[event.RemotePeer]
scope := ev.Event.Data[event.Scope]
szpath := ev.Event.Data[event.Path]
newVal := ev.Event.Data[event.Data]
exists, _ := strconv.ParseBool(ev.Event.Data[event.Exists])
conversation, err := profile.FetchConversationInfo(onion)
if err == nil {
if exists {
zone, szpath := attr.ParseZone(szpath)
if attr.IntoScope(scope) == attr.PublicScope {
if val, err := profile.GetConversationAttribute(conversation.ID, attr.LocalScope.ConstructScopedZonedPath(zone.ConstructZonedPath(szpath))); err == nil || val != "" {
// we have a locally set override, don't pass this remote set public scope update to UI
return ""
}
}
if val, err := profile.GetConversationAttribute(conversation.ID, attr.IntoScope(scope).ConstructScopedZonedPath(zone.ConstructZonedPath(szpath))); err == nil && val == newVal {
// this is identical to the current value. Suppress
return ""
}
}
} else {
// suppress error events
return ""
}
case event.TokenManagerInfo:
conversations, err := profile.FetchConversations()
if err == nil {
@ -612,7 +583,7 @@ func (eh *EventHandler) startHandlingPeer(onion string) {
eventBus.Subscribe(event.NewGroup, q)
eventBus.Subscribe(event.ServerStateChange, q)
eventBus.Subscribe(event.PeerStateChange, q)
eventBus.Subscribe(event.NewRetValMessageFromPeer, q)
eventBus.Subscribe(event.UpdatedConversationAttribute, q)
eventBus.Subscribe(event.ManifestSizeReceived, q)
eventBus.Subscribe(event.ManifestError, q)
eventBus.Subscribe(event.ManifestReceived, q)