From 23d93b2f196ac35b2aaba656bc4bc53e10d01193 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 22 May 2022 00:36:45 -0400 Subject: [PATCH] Fix Snappy post pinning condition. Recently, caa81452f4dc relaxed the condition for Snappy pinning a post from `body.startswith(':#marseypin:')` to the same sans trailing colon. I believe this was intended to allow :marseypin2: to also lead to post pinning. However, the amusing, though incorrect, side effect is that :marseypinkcat: and :marseypinochet: can now also lead to Snappy pins. This has been remedied by explicitly defining the two conditions we want rather than hoping all :marseypin [sic] are about pinning. --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index c8fd8d0a0f..c10ebd68db 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1367,7 +1367,7 @@ def submit_post(v, sub=None): if body.startswith('!slots'): check_for_slots_command(body, snappy, c) - if body.startswith(':#marseypin'): + if body.startswith(':#marseypin:') or body.startswith(':#marseypin2:'): post.stickied = "Snappy" post.stickied_utc = int(time.time()) + 3600