Skip to content

Commit

Permalink
fix: NekoX disableFlagSecure
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao authored and LiuYi0526 committed Jan 17, 2024
1 parent 0a39a09 commit 68433e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 68433e2

Please sign in to comment.