forked from MarseyWorld/MarseyWorld
Fix Snappy post pinning condition.
Recently, caa81452f4
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.
master
parent
a3683099ff
commit
23d93b2f19
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue