Commit graph

968 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
FatherInire
b46ada9f72
Fix some deprecations and factor out a helper function (#387) 2022-10-27 22:15:48 -05:00
Galen Huntington
0889d71647 Fix "view more comments" when not sorting by new. 2022-09-22 00:58:52 -05:00
Michael House
c4b5fe2913 Added filter for logged out users 2022-09-13 09:43:27 -05:00
Michael House
38e263d931 Added filter to make sure new comments only show up on page refresh 2022-09-11 06:10:58 -05:00
Michael House
9fe2ffd72e
Added comments-per-page config. 2022-09-09 17:11:12 -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
Jack Byrne
6b53867ae1 Post validation: better length validation for post submissions 2022-08-19 04:19:41 -05:00
TLSM
965a4dc157 Fix improper calls to Comment.replies.
In four contexts, Comment.replies(.) was not updated to reflect the
interface changes with comment filtering. This directly caused #170
and #172 (which was a stack trace from the former).
  - Updating notifications for DMs (routes/users.py L690)
  - Updating notifications for modmail (routes/users.py L729)
  - morecomments for logged out users (routes/posts.py L421)
  - JSON for API access (classes/comment.py L347)

All four contexts seem to behave correctly after the change. However,
strictly speaking the JSON generation will not include a user's own
filtered or removed comments, though this is hard to remedy without
passing the user object `v` to json_core. Propagating that through the
codebase seems a worse option than leaving it as is.
2022-08-17 14:01:31 -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
850d175563 Fix editing posts 2022-07-31 17:22:43 -05:00
Julian Rota
f736d660b6 Filter on other pages as well 2022-07-09 06:33:41 -05:00
Julian Rota
ba9689f017 Working on hiding filtered comments 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
Julian Rota
68b10ff3f8 Add a site setting for the post filtering feature 2022-05-24 00:13:33 -04:00
Julian Rota
0002f66f36 Merge branch 'frost' into new-user-filtering 2022-05-22 17:01:45 -04:00
FatherInire
fcba426009
Remove some gimmicky r/drama features.
Co-authored-by: Inire <>
2022-05-21 21:43:00 -05:00
Julian Rota
f231726b3a Initial filtering of posts/submissions 2022-05-16 23:33:12 -04:00
Ben Rog-Wilhelm
6eab75ea16
Merge pull request #52 from iro84657/remove-holes
Remove references to holes
2022-05-09 20:26:32 -05:00
Andrew Montenigro
57caad17b0 chore: strip references to 'new' prop from submissions
fixes #49
2022-05-09 11:49:32 -05: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
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
Ben Rog-Wilhelm
edfc35bce2
Merge pull request #35 from 64617/frost
Default all sorts to new
2022-05-08 22:18:50 -05:00
64617
7c18978c54 default comment sorts to new 2022-05-09 10:51:27 +08:00
Julian Rota
21f867a6ae Remove automatic marsey comments 2022-05-08 19:20:53 -04:00
Aevann1
1e13924042 sdf 2022-05-02 00:28:51 +02:00
Aevann1
347684926b sfd 2022-05-01 23:48:53 +02:00
Aevann1
709a7fc4b5 sfd 2022-05-01 23:44:38 +02:00
Aevann1
2ca3c4c71c dfs 2022-04-29 21:19:54 +02:00
Aevann1
c37d5b7ef1 fds 2022-04-28 01:09:39 +02:00
Aevann1
d6019a0dc5 vdx 2022-04-26 16:18:57 +02:00
Aevann1
007f984a89 fds 2022-04-26 15:01:05 +02:00
Aevann1
69a6afd9c5 fds 2022-04-26 02:26:27 +02:00
Aevann1
7813db66ab dfs 2022-04-25 21:52:30 +02:00
Aevann1
c31515811d gf 2022-04-25 16:51:40 +02:00
Aevann1
baf93edcdf fad 2022-04-24 22:39:37 +02:00
pqpetq
cf390af817
fixes and additions (#230)
* Update posts.py

* Update readme.md

* Update requirements.txt

* Update requirements.txt

Co-authored-by: Aevann1 <59999695+Aevann1@users.noreply.github.com>
2022-04-24 15:22:12 +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
c2fee842f2 fds 2022-04-22 16:15:17 +02:00
Aevann1
97aba453c2 fsdfds 2022-04-22 15:23:56 +02:00