Commit graph

960 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
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
f736d660b6 Filter on other pages as well 2022-07-09 06:33:41 -05:00
Julian Rota
420e3e1e8e Don't filter comments from admins 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
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
Julian Rota
6312ebea16 Fix migrations for real this time 2022-07-09 06:33:41 -05:00
Julian Rota
d530cc6a7c Set up database changes for comment filtering 2022-07-09 06:33:41 -05:00
Julian Rota
1e0aa4ee22 Merge branch 'frost' into new-user-filtering 2022-06-06 14:56:28 -04:00
Michael House
fe26e2c10b Merge branch 'frost' into adding_image_assets 2022-06-01 19:33:30 -05:00
Julian Rota
286cc4e2fb Try setting nullable in SqlAlchemy models 2022-05-22 21:33:44 -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
88fcdabd78 Flagging cleanup
Visible only to Admin
Allow multiple flags per user per post
2022-05-18 23:54:20 -04:00
faul-sname
4892b58d10
Add migrations using alembic.
* #39 Add Flask-Migrate dep

* #39 Make it such that flask db init can run

https://github.com/miguelgrinberg/Flask-Migrate/issues/196#issuecomment-381343393

* Run flask db init, update migrations.env, commit artifacts

* Set up a script such that you can `docker-compose exec files bash -c 'cd /service; FLASK_APP="files/cli:app" flask '` and have it do whatever flask thing you want

* Fix circular dependency

* import * is evil

* Initial alembic migration, has issues with constraints and nullable columns

* Bring alts table up to date with alembic autogenerate

* Rerun flask db revision autogenerate

* Bring award_relationships table up to date with alembic autogenerate

* [#39/alembic] files/classes/__init__.py is evil but is at least explicitly evil now

* #39 fix model in files/classes/badges.py

* #39 fix model in files/classes/domains.py and files/classes/clients.py

* #39 fix models: comment saves, comment flags

* #39 fix models: comments

* Few more imports

* #39 columns that are not nullable should be flagged as not nullable

* #39 Add missing indexes to model defs

* [#39] add missing unique constraints to model defs

* [#39] Temporarily undo any model changes which cause the sqlalchemy model to be out of sync with the actual dump

* #39 Deforeignkeyify the correct column to make alembic happy

* #39 flask db revision --autogenerate now creates an empty migration

* #39 Migration format such that files are listed in creation order

* #39 Better first revision

* #39 Revert the model changes that were required to get to zero differences between db revision --autogenerate and the existing schema

* #39 The first real migration

* #39 Ensure that foreign key constraints are named in migration

* #39 Alembic migrations for FK constraints, column defs

* [#39] Run DB migrations before starting tests

* [#39] New test to ensure migrations are up to date

* [#39] More descriptive test failure message

* Add -T flag to docker-compose exec

* [#39] Run alembic migrations when starting the container
2022-05-17 18:55:17 -05:00
Julian Rota
6d68993a8d Merge branch 'frost' into new-user-filtering 2022-05-16 23:55:50 -04:00
Julian Rota
f231726b3a Initial filtering of posts/submissions 2022-05-16 23:33:12 -04:00
Michael House
a85cc39e49 Removed unused images, including some used as defaults in subs 2022-05-16 21:07:28 -05:00
Michael House
19903cccb5
Adding usernotes. 2022-05-16 11:53:24 -05:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
JamPaladin
74476d6223
Add TheMotte theme and make it default.
I created a new theme, "TheMotte" in /assests/css. Someone with any design
skill at all should try improving this. Currently it is a copy of light.css

__main__.py defines the experience for a user without an account. I removed the
check for an OS environment variable, and defaulted to the new theme.

/classes/user.py defines the default for a new account. I removed the check for an OS
environment variable, and defaulted to the new theme.

/routes/settings.py has a list of the themes that checks them for... something.
I added the new one here, just in case.

/templates/settings_profile.html has a hardcoded list that controls which
themes appear in the user settings page. Added the new theme here, so you can
select it.
2022-05-09 07:29:31 -05: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
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
64617
8dc3be28fc dont force users who dont want new to switch sorting every time they open a page (Is this the intended behaviour?) 2022-05-09 11:11:54 +08:00
64617
f6cc00ea1f don't change noeol in files to make the PR cleaner 2022-05-09 11:03:52 +08:00
64617
19d54d8521 default user settings to sort all posts && comments by new 2022-05-09 10:59:14 +08:00
64617
0a37be8020 use default value instead of editing kwargs 2022-05-09 10:58:22 +08:00
64617
7c18978c54 default comment sorts to new 2022-05-09 10:51:27 +08:00
Aevann1
9a793883c1 dsa 2022-05-02 23:30:03 +02:00
Aevann1
dbd973f6ca fsd 2022-05-02 03:45:22 +02:00
Aevann1
95be0ba9cb fsd 2022-05-02 03:42:59 +02:00
Aevann1
0a89fe1822 fsd 2022-05-02 03:41:08 +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
ef95ab85dd fsd 2022-04-29 17:19:50 +02:00
Aevann1
70a31aa9cb sfd 2022-04-29 17:17:14 +02:00
Aevann1
a3832f4c5b fds 2022-04-28 02:04:01 +02:00
Aevann1
d6019a0dc5 vdx 2022-04-26 16:18:57 +02:00
Aevann1
e7e2b901eb fsd 2022-04-26 16:15:06 +02:00
Aevann1
e276965f30 sfd 2022-04-26 15:33:39 +02:00
Aevann1
d9017ece03 fds 2022-04-26 02:36:03 +02:00
Aevann1
69a6afd9c5 fds 2022-04-26 02:26:27 +02:00
Aevann1
4baa34cb0a vcx 2022-04-26 00:43:59 +02:00
Aevann1
37908005fa vxc 2022-04-26 00:41:34 +02:00
Aevann1
269a402309 fsd 2022-04-26 00:28:20 +02:00
Aevann1
72cb84d1cd Revert "vxc"
This reverts commit c21f04d664.
2022-04-25 23:59:12 +02:00
Aevann1
7813db66ab dfs 2022-04-25 21:52:30 +02:00
Aevann1
c21f04d664 vxc 2022-04-25 18:38:06 +02:00