From c70d5a3b94d29cef02596042f978531cd32b81b1 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 17 Jan 2024 22:11:27 +0800 Subject: [PATCH] fix: NekoX disableFlagSecure --- .../src/main/java/org/telegram/messenger/FileLoader.java | 2 +- .../src/main/java/org/telegram/messenger/MessageObject.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java index 09dc725a06..63f438b025 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java @@ -1024,7 +1024,7 @@ private boolean canSaveToPublicStorage(Object parentObject) { if (metadata != null) { int flag; long dialogId = metadata.dialogId; - if (getMessagesController().isChatNoForwards(getMessagesController().getChat(-dialogId)) || DialogObject.isEncryptedDialog(dialogId)) { + if (getMessagesController().isChatNoForwardsWithOverride(getMessagesController().getChat(-dialogId)) || DialogObject.isEncryptedDialog(dialogId)) { return false; } if (parentObject instanceof MessageObject) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java index d745f5e422..0619463fbb 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java @@ -7591,9 +7591,9 @@ public static long getChatId(TLRPC.Message message) { public static boolean shouldEncryptPhotoOrVideo(int currentAccount, TLRPC.Message message) { if (NekoXConfig.disableFlagSecure) { - return true; + return false; } - if (MessagesController.getInstance(currentAccount).isChatNoForwards(getChatId(message)) || message != null && message.noforwards) { + if (MessagesController.getInstance(currentAccount).isChatNoForwardsWithOverride(getChatId(message)) || message != null && message.noforwards) { return true; } if (message instanceof TLRPC.TL_message_secret) {