Commit Graph

21 Commits

Author SHA1 Message Date
Donovan Daniels
6f296e8e01
[Posts] Add back comment disabling (#749) 2024-10-28 13:56:22 -07:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Donovan Daniels
115c140cc2
[Posts] Make comment_disabled not hide comments (#546)
* [Posts] Make comment_disabled not hide comments

* [VoteManager] Disallow voting on locked/disabled comments

* [Comments] Disable editing/hiding disabled & locked comments

* Tweaking

* Allow hiding when comments locked
* Don't allow mods to vote when comments locked
* Change wording from disabled to locked everywhere

---------

Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-09-05 17:27:05 +02:00
Earlopain
d5b9b5fc2b
[Users] Remove unused/unnecessary roles
* Banned users can't login/is unused
* Voting made sense to be separated for danbooru, but not us
* Verified is unused

Previously these would also be part of the body attributes, but I can't
see how they would be useful there
2023-06-12 18:42:40 +02:00
Earlopain
902e35673f
[Posts] Relax voting isolation level and remove lock
"The serialization of the vote and favorite actions was likely excessive
 even in the production configuration, and it has been relaxed to use
 repeatable_read in this implementation. The locks on rows were also
 removed as they do not have strict locking requirements with this transaction
 level to my knowledge."
2023-01-28 15:37:20 +01:00
Earlopain
696ae62ef6
[Votes] Deduplicate Comment/Post vote code 2022-10-08 12:04:17 +02:00
Earlopain
e490b9fa4b
[Votes] Raise expected error on SerializationFailure
This should significantly reduce the clutter in the exception log
2022-03-07 12:28:22 +01:00
Kira
a80e3fcdf1 [Vote] Retry logic multiplying score. 2021-12-22 11:17:56 -08:00
Kira
0259095afa [Votes] Lock posts and comments during voting 2021-12-22 10:38:37 -08:00
Earlopain
8d8a0802a5
[User] Remove memoization of throttles
This interfered with tests and doesn't seem to give much of an advantage
2021-05-15 12:36:29 +02:00
Kira
58e8fe22fd Tests and fixes 2021-02-25 12:08:08 -08:00
Kira
b53152d4cd [Comments] Improve error reporting and reliability of voting 2020-04-16 19:23:13 -07:00
Kira
b3288fd286 Re-throw if retries fail 2020-03-18 19:27:04 -07:00
Kira
8dd6865f43 Retry on failed post favorite/vote actions 2020-03-18 19:12:34 -07:00
Kira
e074080ade Potentially fix vote cheating 2019-09-19 14:41:55 -07:00
Kira
14d86f3b9e Remove super voters. 2019-06-01 08:46:03 -07:00
Kira
511e2aa267 Make post votes work like comment votes 2019-04-10 20:08:36 -07:00
Kira
44ab7b1a8c Comment votes and vote fixups and interface 2019-04-09 13:04:40 -07:00
Kira
0503d7bb8c Most of comment voting fixes and vote viewer
TODO: locking and admin deletion
2019-04-07 21:46:08 -07:00
Kira
4513516e76 Post vote view and locking support 2019-04-06 13:13:50 -07:00
Kira
99f8e9addd Moved favs/voting out into managers to consolidate logic
While the logic was not particularly complex or spread out it was
made more complicated by the models being dependant on one another.

This creates a central entry point for voting and favorites and
coordinates all transactions.

TODO: upvote/downvote/fav metatags in tag section result in an error
because they attempt to change the transaction isolation mode during
an outer transaction.
2019-03-31 13:25:55 -07:00