Commit graph

613 commits

Author SHA1 Message Date
TLSM
3f360bb457 Remove special cases for unused awards.
Removes the following awards / fields on User:
 - flairlock
 - progressivestack
 - bird
 - longpost (pizzashill)
 - marseyawarded
 - rehab
 - deflector
 - mute
 - unmutable
 - eye (All-Seeing Eye)
 - alt (Alt-Seeing Eye)

Primarily motivated by starting to remove some un-Mottelike cruft
from core commenting/posting routes. Cleared out other inapplicable
awards while in the process.
2022-11-09 20:37:04 -06:00
TLSM
9de6f20dea Remove vestigial user ID special cases. 2022-11-09 20:37:04 -06:00
TLSM
c85cd469a1 Move post/comment ID boilerplate inside getters.
Borrows code from the upstream which has been working in production
reliably for ~months. Also, most of it was literally copy-pasted,
and the casted ID values aren't used later in the route functions.
2022-11-09 20:37:04 -06:00
TLSM
1018cf3412 Fix #261: only show lineal parents in contexts. 2022-11-06 03:13:10 -06:00
Ben Rog-Wilhelm
387f5e4f62 Fix: Bug introduced with comment security fix 2022-11-02 01:38:43 -05:00
justcool393
0d4662588e
fix bug that could put comments in wrong submissions
this could let users bypass exiles or other checks

see also: Aevann1/rDrama@d61eda8
2022-10-30 20:17:35 -05:00
Michael House
0bfbf17e45 Implemented collapse bar colorization on the server side 2022-09-23 22:11:55 -05:00
TLSM
f5f2c008ad Fix approved filtered comments not notifying.
Moves behavior in api_comment that updates stateful counters and
generates notifications into a function which can also be called
if a filtered comment is approved. Fixes #272.

Incidentally, also fixes #278 by adding another filter to the post
subscribers query during general clean-up/refactoring.

Originally was going to move this function into the Comments model,
since assurances about state (even with side effects) should probably
be made there, but I couldn't find a sane way to untangle the imports.
2022-09-09 23:31:20 -05:00
Ben Rog-Wilhelm
20fa9ce79f Move a bunch of moderation tools to admin level 2 2022-09-06 18:51:24 -05:00
TLSM
1d705588d4 Remove obfuscated auto-shadowban on keyword. 2022-09-05 23:44:18 -05:00
TLSM
70c8a942b6 Remove games.
Unfortunately not totally dead code paths, and special case behavior
for them complicated commenting and sorting logic in a number of
places.
2022-09-05 23:44:18 -05:00
TLSM
dbaf0a1bfd Remove unused polls code to reduce query volume.
Due to use of Submission.{choices, options, bet_options} in realbody,
generating submission_listings resulted in extremely high volume of
SELECT queries.

In local testing with 6 posts, one of which had a poll with 2 options,
the removal of these calls reduced quantity of queries on the homepage
from 84 to 22.

Given that it was previously decided to remove the polls feature after
a regression while adding comment filtering, the remaining dead code
paths for polls were also removed.
2022-09-05 23:44:18 -05:00
TLSM
e12b0eea1a Remove treasure rewards for comments.
Given that coins are not visible in many contexts, the conspicuous
appearance of treasure chests (random coin rewards on 1% of comments)
seems out of place. This removes the logic which rewards treasure,
the visible display of treasure, and drops the column containing
treasure information which has already been awarded to at least one
comment on prod.
2022-09-04 19:12:30 -05:00
TLSM
a35697e55e
Replace nearly all ?v= cachebusts with assetcache.
Using the new assetcache module, we replace (almost) all instances
of `?v=` cachebusting query parameters in Python and in Jinja templates.
The primary exceptions were: user site backgrounds, and some
infrequently changed graphics referenced literally from .js files.
2022-08-30 17:02:46 -04:00
Julian Rota
27d48226de Remove lack of comment count increment if comment is a reply to self 2022-08-29 14:16:49 -05:00
painejohn
cbcc2aac6f
139: Disabled multimedia embedding
This change disables multimedia embedding:

- In comments and comments replies.
- In new submissions.
- In comment & submission preview

And it's all toggle-able via an envvar, except for the JS bits,
but I linked those to the github issue, so should be easy to find
in the future.

The way it works is:

- removes markdown image/video syntax,
  eg. `![](https://example.org/someimage.jpg)` into ``
- changes link text into anchors, eg.
  `https://example.org/someimage.jpg` into
  `[https://example.org/someimage.jpg](https://example.org/someimage.jpg)`
- removes html img/video/audio tags, eg.
  `<img href="https://example.org/someimage.jpg" />` into ``
- when embedding gifs via the giphy modal in "new submission", it will
  insert only an anchor to the gif
- when attaching an image, it will upload the image, then add only an
  anchor to the post/comment body

I tested this manually, but not sure if I got all the test cases. What I
checked was:

- create comment w/ image/video/audio media using markdown -> success
- create comment reply w/ image/video/audio media using markdown ->
  success
- create comment w/ link to img/imgur/youtube/audio -> success
- create comment w/ attachment -> success
- create comment reply w/ attachment -> success
- create comment w/ img/video tag -> success
- create comment reply w/ image/video tag -> success
- create post submission w/ image/video/media using markdown -> success
- create post submission w/ link to img/imgur/youtube/audio -> success
- create post submission w/ attachment -> success
- create post submission w/ giphy gif -> success

Also, updated the formatting page.

Co-authored-by: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2022-08-07 01:30:47 -05:00
Ben Rog-Wilhelm
800ae8d2dc Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
Julian Rota
d1d7071304 Set comment filter status based on settings 2022-07-09 06:33:41 -05:00
Julian Rota
3c2871dd0f Set filter status badly so commenting works again 2022-07-09 06:33:41 -05:00
Michael House
82a18e5cad Up-merged and resolved conflicts in routes/login.p and routes/votes.py 2022-05-22 08:23:59 -05:00
FatherInire
fcba426009
Remove some gimmicky r/drama features.
Co-authored-by: Inire <>
2022-05-21 21:43:00 -05:00
Michael House
f3a479f991 Removed emoji feature from templates and deleted emoji images 2022-05-18 20:53:28 -05:00
faul_sname
8e3ee8d9a2 [#80] Just entirely nuke the marsey stuff with the hardcoded post id 2022-05-17 19:00:23 -05:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
iro84657
35fdbd2e2e Remove references to holes 2022-05-09 11:01:11 -04:00
Ben Rog-Wilhelm
1ee9c1bfa7
Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
iro84657
193ff08a3d Remove special cases based on request.host 2022-05-09 01:40:09 -04:00
iro84657
4341e2d980 Remove special cases based on SITE 2022-05-09 01:40:09 -04:00
iro84657
71743a3bfc Remove special cases based on SITE_NAME 2022-05-09 01:40:09 -04:00
iro84657
0bab69947a
Remove hot posts button from mobile interface (#38)
This commit also cleans up some remnants of the previous default sort
orders.
2022-05-08 23:21:43 -05:00
Michael House
e9d6bb151e Removing reliance on rDrama assets 2022-05-03 22:10:41 -05:00
Aevann1
347684926b sfd 2022-05-01 23:48:53 +02:00
Aevann1
709a7fc4b5 sfd 2022-05-01 23:44:38 +02:00
outruncolors
de062c025d
Added doubledown and insurance functionality (#235)
* Added doubledown functionality

* Add insurance
2022-05-01 20:24:01 +02:00
Aevann1
a3832f4c5b fds 2022-04-28 02:04:01 +02:00
Aevann1
35697540af fsd 2022-04-26 15:40:37 +02:00
Aevann1
007f984a89 fds 2022-04-26 15:01:05 +02:00
Aevann1
269a402309 fsd 2022-04-26 00:28:20 +02:00
Aevann1
c31515811d gf 2022-04-25 16:51:40 +02:00
Aevann1
baf93edcdf fad 2022-04-24 22:39:37 +02:00
Aevann1
a7e911e56d fds 2022-04-24 00:09:25 +02:00
Aevann1
ade23c48c5 fds 2022-04-24 00:06:45 +02:00
Aevann1
15d77234e6 fds 2022-04-23 00:48:01 +02:00
Aevann1
f09f1be3e9 fsd 2022-04-22 17:05:34 +02:00
Aevann1
97aba453c2 fsdfds 2022-04-22 15:23:56 +02:00
Aevann1
91540c161a Revert "RESTORE CACHE"
This reverts commit fe25f41fad.
2022-04-19 22:22:24 +02:00
Aevann1
fe25f41fad RESTORE CACHE 2022-04-19 22:21:47 +02:00
Aevann1
d833e3916c fsd 2022-04-18 20:25:14 +02:00
Aevann1
5d73bb34e8 fds 2022-04-18 19:51:39 +02:00
Aevann1
42f70bc64e fdsfds 2022-04-15 18:28:08 +02:00