rDrama/files/classes
Snakes 9eab252e5b
Fix reply/mention notifications from muted users.
Consider the case of the current /notifications filter condition:
    WHERE ... NOT ((comments.sentto = 2) AND (users.is_muted))

SELECT 1 WHERE NOT ((null = 2) AND (true)); ⇒ 0 rows
SELECT 1 WHERE NOT ((1 = 2) AND (true)); ⇒ 1 row
SELECT 1 WHERE NOT ((2 = 2) AND (true)); ⇒ 0 rows

We want the first expression, where comments.sentto = null, to evaluate
to false, not to null, so it negates to true. Behavior as written is:

SELECT 1 WHERE NOT ((null = 2) AND (true)); →
SELECT 1 WHERE NOT (null AND true); →
SELECT 1 WHERE NOT null; →
SELECT 1 WHERE null;

Which guarantees a null return set. If we check first for non-nullity:

SELECT 1 WHERE NOT ((null IS NOT null) AND (null = 2) AND (true)); ⇒ 1
SELECT 1 WHERE NOT ((1 IS NOT null) AND (1 = 2) AND (true)); ⇒ 1
SELECT 1 WHERE NOT ((2 IS NOT null) AND (2 = 2) AND (true)); ⇒ 0
2022-11-21 23:08:31 -05:00
..
__init__.py kofi: decide whether to load in __init__ 2022-11-17 14:00:19 -06:00
alts.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
award.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
badges.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
casino_game.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
clients.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
comment.py user can_view functions (#460) 2022-11-17 16:02:08 -05:00
domains.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
exiles.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
flags.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
follows.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
hats.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
leaderboard.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
lottery.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
marsey.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
media.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
mod.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
mod_logs.py use cloudflare icon 2022-11-15 15:54:24 +02:00
notifications.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
polls.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
saves.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
streamers.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
sub.py expand IS_LOCALHOST 2022-11-21 00:16:49 +02:00
sub_logs.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
sub_relationship.py sub relationship class (#456) 2022-11-15 11:05:42 -05:00
submission.py use postToast in betting so the js deducting coins only execute if responde code is < 300 2022-11-21 03:00:16 +02:00
subscriptions.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
transactions.py kofi: decide whether to load in __init__ 2022-11-17 14:00:19 -06:00
user.py Fix reply/mention notifications from muted users. 2022-11-21 23:08:31 -05:00
userblock.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
views.py [DO NOT MERGE] import detanglation (#442) 2022-11-15 03:19:08 -06:00
votes.py Fix API for /comment/<cid>, /search/comments. 2022-11-18 15:33:07 -05:00