From 88352cc1cb00ca5800b4cebc9087ff53f7b03e50 Mon Sep 17 00:00:00 2001 From: Snakes Date: Tue, 13 Dec 2022 22:07:32 -0500 Subject: [PATCH] Revert "modmail: fix modmail 404 (#64)" This reverts commit a9309096b477bd6d3f7976d87fc4f8296ebb1efa. This doesn't fix the modmail bug in all contexts and introduces a bug in another. Root cause is that POST /comments is sometimes called by DM reply boxes (rather than POST /@/message), revert pending fix. --- files/routes/comments.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index baef4bbb2..903fdbee0 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -106,8 +106,7 @@ def comment(v:User): if POLL_THREAD and parent.id == POLL_THREAD and v.admin_level < PERMS['POST_TO_POLL_THREAD']: abort(403) elif parent_fullname.startswith("c_"): parent = get_comment(id, v=v) - post_target = get_post(parent.parent_submission, v=v, graceful=True) or \ - get_account(parent.wall_user_id, v=v, include_blocks=True, include_shadowbanned=False, graceful=True) + post_target = get_post(parent.parent_submission, v=v, graceful=True) or get_account(parent.wall_user_id, v=v, include_blocks=True, include_shadowbanned=False) parent_comment_id = parent.id if parent.author_id == v.id: rts = True if not v.can_post_in_ghost_threads and isinstance(post_target, Submission) and post_target.ghost: