From ae179fab723e30a2c6b055ca3ba416a3280773c6 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 8 Feb 2023 13:51:09 -0800 Subject: [PATCH] Ensure Block Unknown Connections Settings is Respected on Protocol Engine Restart --- utils/eventHandler.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/eventHandler.go b/utils/eventHandler.go index ff0946b..6c2e8bd 100644 --- a/utils/eventHandler.go +++ b/utils/eventHandler.go @@ -611,6 +611,14 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string { case event.ProtocolEngineCreated: // TODO this code should be moved into Cwtch during the API officialization... settings := ReadGlobalSettings() + + // ensure that protocol engine respects blocking settings... + if settings.BlockUnknownConnections { + profile.BlockUnknownConnections() + } else { + profile.AllowUnknownConnections() + } + // Now that the Peer Engine is Activated, Share Files key, exists := profile.GetScopedZonedAttribute(attr.PublicScope, attr.ProfileZone, constants.CustomProfileImageKey) if exists {