better can_see logic

pull/135/head
Aevann 2023-02-27 14:46:22 +02:00
parent d11a63101e
commit 94ed49569a
1 changed files with 1 additions and 6 deletions

View File

@ -979,12 +979,7 @@ class User(Base):
else:
if other.parent_submission:
if not (user and user.patron) and other.post.title.lower().startswith('[paypigs]'):
return False
if user and user.id == other.post.author_id: return True
if other.post.sub and not cls.can_see(user, other.post.subr): return False
# if not cls.can_see(user, other.post): return False
return cls.can_see(user, other.post)
else:
if not user and not other.wall_user_id: return False
if not other.sentto: return True # handled by Notification