Commit Graph

667 Commits (f418bf4333260908f95168e9086032cf18152499)

Author SHA1 Message Date
Snakes 8f7d05d62d
Refactor feature flags to dict.
In anticipation of adding about a dozen more features flags to support
work for LGB, PIN_ENABLED and PROCOINS_ENABLED have been moved to the
FEATURES dict in const.py. More generally looking to create a unified
interface for logically-related constants, perhaps to support e.g.
later moving these settings from hardcoded constants to data.
2022-07-18 01:10:01 -04:00
Snakes a217f76bad Deux: sidebar, sidebar thread; restrict holes. 2022-07-14 02:19:59 -04:00
Aevann1 3554ae8e7c re-allow notifs on admigger threads 2022-07-13 21:21:13 +02:00
Aevann1 ff4f423c2c testing on deux 2022-07-13 21:17:17 +02:00
Aevann1 4dc3c2d416 testing on deux 2022-07-13 21:14:59 +02:00
Aevann1 2d21863e19 replace "request.host" with "SITE" 2022-07-13 20:14:37 +02:00
Aevann1 aa4ab5b217 sneed 2022-07-13 17:16:53 +02:00
Aevann1 f7c2befeed allow deux jannies to add badges 2022-07-13 14:56:30 +02:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 c380848d47 remove leftover code from ill-fated joinedload attempt 2022-07-08 20:28:56 +02:00
Aevann1 b9d6f796a3 return 404 on shadowbanned comments when linking to them 2022-07-08 13:13:59 +02:00
Aevann1 747ccf5dab don't count deleted posts and comments 2022-07-08 13:07:27 +02:00
Aevann1 1f0f0ef0be messing with joins 2022-07-03 08:12:53 +02:00
Aevann1 d0d15c319a Poll rework (#312)
* poll rework

* forgot to do joinedload on comments

* Fix logic errors with voting, SQL syntax.

Kitchen sink commit from review of poll-rework changes:
  1. Fix seed-db.sql syntax error.
  2. Fix SQL patch file duplication of *submissions* tables rather
     than one set of submissions and one for comments.
  3. Start makeshift SQL patch folder, since this is a large change
     that contributors may wish to apply to their local instances.
  4. Fix checkbox (non-`exclusive`) polls being unable to be
     unchecked. For consistency with `exclusive` polls, they should.
  5. Fix changing the option of an `exclusive` poll when both
     exclusive and non-exclusive options are present in one comment/
     post causing the non-exclusive options to become unchecked.
     (which, by my reading of SQLAlchemy `Query.one_or_none()`
     really could break quite badly in some cases).

* link relationships with their counterparts

* small modification to poll unchecking

Co-authored-by: TLSM <duolsm@outlook.com>
2022-07-02 08:48:04 +02:00
Aevann1 e8f5827c5e more testing 2022-07-01 15:34:11 +02:00
Aevann1 b602a66dd6 fix issue with text exceeding character count despite not exceeding it 2022-06-29 03:13:11 +02:00
Snakes 08c2ec7223 Make pin disabling site-specific. 2022-06-28 02:27:25 -04:00
Snakes b50151e120 Commit db txn on comment spam 403. 2022-06-27 23:22:38 -04:00
Aevann1 d4d53d57d0 disable pinning comments too 2022-06-28 03:34:17 +02:00
Aevann1 79479d9ffd make it so u dont get pinged by ur own comment on a subscribed thread 2022-06-27 21:13:19 +02:00
Aevann1 a0cb5874cc refactor push notifs 2022-06-27 21:02:24 +02:00
Aevann1 d31d6b8617 restore push notifs 2022-06-27 20:42:41 +02:00
Aevann1 41b7b1298e add logic for 100 marseys badge 2022-06-27 06:42:39 +02:00
Aevann1 f48b16d0ca make it so when u make a comment with polls, you see the polls immediately
(instead of needing to refresh)
2022-06-27 00:32:32 +02:00
Aevann1 58867084af temporarily disable push notifs to get rid of console spam 2022-06-26 23:04:11 +02:00
Aevann1 3b8188fd67 fixed version of d83d47e280 2022-06-26 03:22:05 +02:00
Aevann1 a1b137447e Revert "reduce query volume #1"
This reverts commit d83d47e280.
2022-06-26 03:12:31 +02:00
Aevann1 cff34fb3a4 reducing query volume, #2 2022-06-26 03:11:02 +02:00
Aevann1 d83d47e280 reduce query volume #1 2022-06-26 02:50:47 +02:00
Aevann1 2e8fb4ac07 sneed 2022-06-25 00:27:42 +02:00
Aevann1 f34c4e1196 stop using app.config for our own stuff 2022-06-24 17:08:57 +02:00
Aevann1 9593dc58dd move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00
Aevann1 6f6d01c1c6 actually use the get functions 2022-06-24 15:19:53 +02:00
Aevann1 f6bb11bdc2 make so it post subscription only give notifs to top-level comments 2022-06-22 20:05:56 +02:00
Aevann1 414eb12410 add poll_thread 2022-06-22 20:01:00 +02:00
Snakes e212eb567d Exclude comments on drafts from edit limit.
Draft posts have already been excluded from the edit time limit for
obvious reasons--drafts are intended to be edited, and people use them
as personal megathreads on their profiles. Largely for the latter
use case, this commit also excludes comments on drafts from the limit.
2022-06-20 07:39:45 -04:00
Aevann1 14ffb39ba6 increase edit_comment ratelimit 2022-06-19 19:16:18 +02:00
Aevann1 d9cdbd0015 return to only allowing images/videos/audio 2022-06-19 18:56:45 +02:00
Aevann1 668cfdc90a made it not possible to edit posts/comments older than a week 2022-06-18 22:53:10 +02:00
Aevann1 eba4452d79 fix 500 error 2022-06-18 22:41:00 +02:00
Aevann1 b34dd88560 remove legacy code in video upload (thx @everyone) 2022-06-18 18:23:10 +02:00
Aevann1 ccdabcba29 allow uploading of all types of files (using lain.la)
+ allow multiple file upload in bios and messaging admins
2022-06-18 17:53:34 +02:00
Aevann1 56f8cf793e give visible bots a body column (so their comments are searchable)
+ don't sanitize zoz/longpostbot/aj comments
2022-06-18 17:37:01 +02:00
Aevann1 f60db1598d replace "g.db.query" on pkeys with the much more efficient "g.db.get" 2022-06-18 02:57:23 +02:00
Aevann1 28fa03669d use f-string 2022-06-18 00:14:27 +02:00
Snakes 7e54f858d3 Amend f8ae2a3d17c6: revert >= logic, fail loudly.
First, the apparent errors with >= 9 and 99 in the Marseys and
referrals code after the refactor are not actually bugs: they were
bug fixes mixed in with the refactor to fix an off-by-one.

Next, instead of failing silently on the `not user` branch in
badge_grant, we throw a ValueError. This retains the current
behavior where users get 500s to report while also enforcing the
assertion near the edge of the function.
2022-06-15 16:32:25 -04:00
Snakes f8ae2a3d17 Amend 3bc98f0a6b84: minor logic, style. 2022-06-15 16:08:26 -04:00
Aevann1 3bc98f0a6b extend TLSM's badge_grant() to almost all instanes where badges are granted 2022-06-15 21:33:21 +02:00
Aevann1 07f2c0d2ca make marsey counter work everywhere (not just comments) 2022-06-13 20:05:24 +02:00
Snakes acde2c856b Enable JL2 viewing shadowbanned comments. 2022-06-12 05:48:27 -04:00