From bda1e1f7b610b440b349df10cf44ef4206bd3819 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 7 Jul 2023 21:55:00 +0300 Subject: [PATCH] don't send unecessary data --- files/classes/comment.py | 1 - files/classes/post.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index aec56587d6..ccc4238f86 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -305,7 +305,6 @@ class Comment(Base): 'downvotes': self.downvotes, 'is_bot': self.is_bot, 'reports': reports, - 'author': '👻' if self.ghost else self.author.json, # 'replies': [x.json for x in self.replies(sort="old", v=None)] # WORKER TIMEOUTS ON BUGTHREAD } diff --git a/files/classes/post.py b/files/classes/post.py index b9b1828dd5..ad508f2cac 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -208,7 +208,7 @@ class Post(Base): for r in self.reports: reports[r.user.username] = r.reason - data = {'author_name': self.author_name if self.author else '', + data = {'author_name': self.author_name, 'permalink': self.permalink, 'shortlink': self.shortlink, 'is_banned': bool(self.is_banned), @@ -234,7 +234,6 @@ class Post(Base): 'distinguish_level': self.distinguish_level, 'voted': self.voted if hasattr(self, 'voted') else 0, 'reports': reports, - 'author': '👻' if self.ghost else self.author.json } if "replies" in self.__dict__: