From 2c3a7daa65a8a4d00ac96312716ed7352fba3e56 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 8 Nov 2023 14:32:54 -0500 Subject: [PATCH] Fixes bug when the app calls this method directly, bypassing the other checks in AccountViewModel --- .../main/java/com/vitorpamplona/amethyst/model/Account.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index 29b5cee1b..d8e69bb4e 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -3058,6 +3058,14 @@ class Account( } fun isAcceptable(user: User): Boolean { + if (userProfile().pubkeyHex == user.pubkeyHex) { + return true + } + + if (user.pubkeyHex in followingKeySet()) { + return true + } + if (!warnAboutPostsWithReports) { return !isHidden(user) && // if user hasn't hided this author user.reportsBy(userProfile()).isEmpty() // if user has not reported this post