Commit Graph

148 Commits (d98e4c9c1c809e0839e17b40d973fcab800f4424)

Author SHA1 Message Date
Aevann1 d98e4c9c1c convert repo from CRLF to LF 2022-10-04 17:24:58 +02:00
justcool393 40c2360d00 don't duplicate checks for comments 2022-09-30 15:51:17 -07:00
Aevann1 135bd2c60c remove unnecessary gay shit 2022-09-14 11:20:59 +02:00
Aevann1 73dbb2dd7e change t2_ and t3_ to p_ and c_ 2022-09-06 00:52:22 +02:00
Aevann1 0c32d56cd6 casino + style shit 2022-09-05 01:15:37 +02:00
Aevann1 e5b2675f0d try to fix db 500 errors on wpd 2022-09-01 21:05:37 +02:00
Aevann1 f92a83724b try to fix 500 error in WPD 2022-08-26 16:57:14 +02:00
Aevann1 6a21dd347b Revert "Revert "Revert "restore autoflush"""
This reverts commit d84b26fc77.
2022-08-25 17:04:33 +02:00
Aevann1 d84b26fc77 Revert "Revert "restore autoflush""
This reverts commit 5aa03d87bb.
2022-08-24 16:36:44 +02:00
Aevann1 e5046c9f20 remove /h/slackernews from the boost 2022-08-24 00:00:15 +02:00
Aevann1 120fe920d7 give a pemanent progstack effect to posts linking to '.win' domains 2022-08-23 17:29:24 +02:00
Aevann1 83e8d7b015 give a permenant progstack effect to ('slackernews','space','istory','dinos') 2022-08-23 17:28:00 +02:00
Aevann1 5aa03d87bb Revert "restore autoflush"
This reverts commit 687cd766b9.
2022-08-23 17:17:37 +02:00
Aevann1 687cd766b9 restore autoflush 2022-08-17 18:36:59 +02:00
Aevann1 9341f2368a make some function names shorter 2022-08-11 06:05:23 +02:00
Aevann1 57cc579b30 try to fix 500 error caused by vote constraints 2022-08-11 06:03:09 +02:00
Snakes 0c43deeee6
FEATURES: pronouns, kys, chat, house, /vote perm. 2022-07-18 02:43:20 -04:00
Aevann1 2d21863e19 replace "request.host" with "SITE" 2022-07-13 20:14:37 +02:00
Aevann1 2a95c25675 allow @bbbb to vote 2022-07-12 21:23:37 +02:00
Aevann1 b617321529 move all env-getting to .const 2022-07-08 18:21:13 +02:00
Snakes a3f94a77f3 Fix comment /votes/ 500 when no upvoters. 2022-07-07 19:53:28 -04:00
Aevann1 1a0b2b6813 fix 500 errors 2022-07-02 08:51:19 +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 8c246e5678 separate large numbers by value in /votes 2022-07-01 01:42:55 +02:00
Aevann1 1362278cb4 add more data for jannies in /votes page (will use that in polls) 2022-07-01 01:39:09 +02:00
Snakes 159af40cfe Fix /bet route not enforcing exclusive votes. 2022-06-28 03:43:16 -04:00
Aevann1 7e7450ef33 Made it possible to downvote poll options again
for schizocel my beloved
2022-06-28 09:20:29 +02:00
Aevann1 4a1359713f use the variable "poll_bots" 2022-06-28 04:00:28 +02:00
Aevann1 e7ce39bd80 fix poll-voting 2022-06-26 22:53:12 +02:00
Aevann1 cff34fb3a4 reducing query volume, #2 2022-06-26 03:11:02 +02:00
Aevann1 6f6d01c1c6 actually use the get functions 2022-06-24 15:19:53 +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
Snakes 04a878a8c4 Make betting polls respect can_gamble. 2022-05-30 08:13:11 -04:00
Snakes c789f6923e Merge remote-tracking branch 'upstream/frost' into birthgay-staging 2022-05-19 17:59:35 -04:00
Snakes f0c9a354e9 Implement better double XP infrastructure.
Double XP now has a constant for unixtime to start. Logic around
DXP is designed to only apply to votes made after DOUBLE_XP_ENABLED.
This prevents an exploit in the old implementation where spam voting/
unvoting a post made prior to the DXP start could farm 300 DC/hr/alt.
Also it's more maintainable and comports with the coin_delta changes
to prevent self-vote coin changes.
2022-05-18 00:54:05 -04:00
Aevann1 b71ae6cc74 sf 2022-05-09 13:21:49 +02:00
Aevann1 6b10d097a2 mn 2022-05-05 01:09:46 +02:00
Aevann1 93c0bbff60 sdf 2022-05-04 02:47:06 +02:00
Aevann1 47d01ed00b vb 2022-05-03 04:15:35 +02:00
TLSM d1e2926ca3 Fix comment self-upvote removal UI bug. (#236)
Fixes minor UI bug when removing self-upvote on a comment. Previous
behavior, starting from a new comment:
    - Initial state: score 1 from self-upvote, upvote button shows
      highlighted as `color: var(--primary)`.
    - Click on upvote button to remove self-upvote → button
      unhighlights, score displays as 0.
    - [reload page]
    - Score displays as 0, but button is highlighted.
    - Click on upvote button → button unhighlights, score displays
      as -1. [If you reload the page now, state is score 0 &
      highlighted; no change in serverside votes.]
    - Click on upvote again → button highlights, score displays as 0.
    - [reload page]
    - Score displays as 1, button is highlighted.
Direct cause is `templates/comments.html @ L115-117`. I checked
`api_comment`, though, and it adds a vote on new comments, and that
state change propagates to the template's parameters before it renders,
so I believe the only time this triggers is specifically when a user
has removed their self-upvote. Bug is fixed when testing with L115-117
removed. Is there some other edge case it was meant to solve?

Secondary bugfix: Removing a self-upvote _costs_ you a coin & a
truescore point. I think this is one of the few ways to get negative
dramacoin. I chose to fix it by having self-votes and self-unvotes not
change coins/truecoins. The alternative of having new comments & posts
give the user +1 coin/truecoin would modify site behavior, and you'd
retroactively owe some powerusers thousands of DC & truescore.
2022-05-02 20:12:28 +02:00
Aevann1 df793e5347 fsd 2022-04-20 21:25:19 +02:00
Aevann1 1042072ad8 fsd 2022-03-31 16:25:49 +02:00
Aevann1 47ddcd97bb fg 2022-03-29 21:34:35 +02:00
Aevann1 c90792d663 fds 2022-03-21 02:40:15 +02:00
Aevann1 8e68ce92eb g.db.commit() 2022-03-19 14:52:36 +02:00
Aevann1 514d6ec126 right 2022-03-09 03:44:53 +02:00
Aevann1 6681ca4236 fds' 2022-02-23 07:17:03 +02:00
Aevann1 9c4dcb1144 gf 2022-02-16 03:42:11 +02:00
Aevann1 729e4a4c62 g 2022-02-16 03:16:01 +02:00
Aevann1 156774e9c0 fds 2022-02-07 14:46:28 +02:00