Fixes bug when the app calls this method directly, bypassing the other checks in AccountViewModel

This commit is contained in:
Vitor Pamplona 2023-11-08 14:32:54 -05:00
parent 1771b6e667
commit 2c3a7daa65

View File

@ -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