Commit graph

956 commits

Author SHA1 Message Date
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
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
a34416e074 fsa 2022-04-18 23:18:02 +02:00
Aevann1
aa7581a440 fsd 2022-04-18 20:30:25 +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
eccfb31469 fds 2022-04-17 22:20:40 +02:00
Aevann1
a1156f9ea4 fds 2022-04-17 16:59:18 +02:00
Aevann1
42f70bc64e fdsfds 2022-04-15 18:28:08 +02:00
Aevann1
c49e194d41 fds 2022-04-15 17:35:56 +02:00
Aevann1
2c96266315 fds 2022-04-15 17:35:11 +02:00
Aevann1
4c88511cf9 fds 2022-04-14 18:26:41 +02:00