From 4930778807c2438620ae2dcb31099102e70ff374 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 12 Nov 2021 20:37:34 +0400 Subject: [PATCH] Fix copy protection setup --- .../PeerInfoUI/Sources/ChannelVisibilityController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift index 6c7a30bfc5..19e682416f 100644 --- a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift +++ b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift @@ -1228,7 +1228,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta } if let updatedCopyProtection = state.forwardingEnabled { - toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: updatedCopyProtection).start()) + toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: !updatedCopyProtection).start()) } if let updatedAddressNameValue = updatedAddressNameValue { @@ -1308,7 +1308,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta } if let updatedCopyProtection = state.forwardingEnabled { - toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: updatedCopyProtection).start()) + toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: !updatedCopyProtection).start()) } if let updatedAddressNameValue = updatedAddressNameValue {