Commit graph

698 commits

Author SHA1 Message Date
Hugh Rundle
6bc86f189f notify group members of group changes
Send a notification to all group members when group name, description, or privacy are changed.
2021-10-22 20:23:45 +11:00
Hugh Rundle
bd20c9ce2c remove followers group visibility test
Also updates description of group.followers_filter() override
2021-10-22 18:42:18 +11:00
Hugh Rundle
6e5c0cc4c3 Merge branch 'main' into bookwyrm-groups
There are database migrations in main ahead of this branch so they need to be merged in to the branch before we can merge back into main.
2021-10-17 06:22:04 +11:00
Hugh Rundle
2a31bf2f0c delete groups
Whoops, forgot to add this functionality earlier.

- allow owner to delete a group
- change all group lists to closed curation with group=False when group deleted
2021-10-16 17:35:36 +11:00
Hugh Rundle
6f13c0d808 formatting fix 2021-10-16 16:09:03 +11:00
Hugh Rundle
97ea61dd7e efficiency improvement to remove_from_group 2021-10-16 08:17:42 +11:00
Mouse Reeve
eac1ed3484
Merge pull request #1534 from bookwyrm-social/followers-display
Fixes privacy filters for followers-only replies
2021-10-15 13:38:42 -07:00
Mouse Reeve
c6caa5a3f4 Fixes privacy display 2021-10-15 13:26:02 -07:00
Hugh Rundle
2f38af4faa Revert "clean up List db queries"
This reverts commit 41f27a4a66.

I forgot that update() can only be done on a query result, not on an object, so we will need to go back to querying in order to update rather than saving.
2021-10-16 06:59:07 +11:00
Mouse Reeve
1072381b7d Fixes followers filter for non-status objs 2021-10-15 11:09:46 -07:00
Mouse Reeve
bd0e4abd56 Uses correct model field for raw values 2021-10-15 10:36:46 -07:00
Mouse Reeve
117e6a08b2 Merge branch 'main' into markdown 2021-10-15 10:06:34 -07:00
Mouse Reeve
b11b810ec9 Use edit date to track is status has been updated 2021-10-15 08:56:07 -07:00
Hugh Rundle
1634c8774e remove useless field in Notifications model 2021-10-15 17:59:39 +11:00
Hugh Rundle
41f27a4a66 clean up List db queries
- don't unnecessarily query DB in List views
- use more efficient query in remove_from_group List class method
2021-10-15 17:56:23 +11:00
Mouse Reeve
af567ba05e Edit posts in original markdown syntax 2021-10-14 18:34:26 -07:00
Mouse Reeve
175df2181c Adds edited field to status model 2021-10-14 17:33:04 -07:00
Mouse Reeve
cc650e235b Fixes privacy filters for followers-only replies 2021-10-14 16:26:28 -07:00
Hugh Rundle
726217577f linting 2021-10-10 13:18:16 +11:00
Hugh Rundle
83f46b6cda remove print() statement
Whoops accidentally left this behind from manual troubleshooting
2021-10-10 12:01:21 +11:00
Hugh Rundle
252ff0d689 emblacken files
Wouldn't it be great if I just remembered to run Black before every commit?
2021-10-09 22:15:24 +11:00
Hugh Rundle
9940abfd81 refactor removing user from group
This is in preparation for removing a user and their lists when the group owner blocks them.
Remove the user via models.group
Remove the lists via models.list
2021-10-09 22:11:46 +11:00
Hugh Rundle
1bf5758e01 overide filters for groups and group lists
- use more sensible query for displaying groups on user page
- privacy_filter now allows group members to see followers_only and private lists and groups they would otherwise not see
2021-10-09 16:11:11 +11:00
Hugh Rundle
056150d583 CASCADE group.user
Delete groups when group.user is deleted.
2021-10-08 21:21:19 +11:00
Hugh Rundle
39e002ee13 Merge remote-tracking branch 'origin/bookwyrm-groups' into bookwyrm-groups
Merge changes from main project into local branch
2021-10-08 18:53:59 +11:00
Hugh Rundle
05bde27944 remove commented out code 2021-10-08 18:46:30 +11:00
Mouse Reeve
4ba3234f6c
Merge branch 'main' into bookwyrm-groups 2021-10-07 17:27:11 -07:00
Mouse Reeve
ba5ec878fa Adds language preference to database 2021-10-06 12:19:52 -07:00
Mouse Reeve
73a8f89bee
Merge branch 'main' into bookwyrm-groups 2021-10-06 11:37:38 -07:00
Mouse Reeve
8d00ef4318 Style cleanup 2021-10-06 11:23:36 -07:00
Mouse Reeve
53e5762563 Status-specific filters in status model 2021-10-06 11:19:13 -07:00
Mouse Reeve
34d6c88861 Move privacy levels filter to clearer location 2021-10-06 11:15:17 -07:00
Mouse Reeve
2307cb2227 Filter followers only in place
It's only used in one spot
2021-10-06 11:12:03 -07:00
Mouse Reeve
68b6b1fbae User override in child class instead of if/else for privacy_filter 2021-10-06 11:08:54 -07:00
Mouse Reeve
97cc129478 Updates calls to privacy_filter 2021-10-06 10:37:09 -07:00
Mouse Reeve
b2671e78ef Moves privacy filter to model class 2021-10-06 09:48:11 -07:00
Hugh Rundle
f8e0de1ea9 run black for clean code
Godammit Hugh remember to do this before pushing new code.
2021-10-05 21:32:48 +11:00
Hugh Rundle
6fde19e9b1 lint fixes 2021-10-05 21:29:33 +11:00
Hugh Rundle
cc8db1c353 linting fixes
- remove unused imports
- add class docstrings
2021-10-05 09:05:20 +11:00
Hugh Rundle
90d92edd75 disable pylint on NotificationType now being "too long" 2021-10-05 08:10:23 +11:00
Hugh Rundle
78f5003407 lint raise_visible_to_user
Don't return True unnecessarily
2021-10-05 08:09:24 +11:00
Hugh Rundle
57b2c83c64 disable pylint suppression
I don't know what this does so I removed it - maybe I'll find out!
2021-10-04 21:34:54 +11:00
Hugh Rundle
dafda649f1 run Black on changed code 2021-10-04 21:31:28 +11:00
Hugh Rundle
c04659984f fix raise_not_editable for group lists 2021-10-03 13:45:19 +11:00
Hugh Rundle
603a9dc25c fix group members not being able to delete items on group lists 2021-10-03 12:22:03 +11:00
Hugh Rundle
77ac8e0c04 add group membership to raise_not_deletable for lists 2021-10-03 11:45:53 +11:00
Hugh Rundle
602664b8d7 Merge branch 'main' into groups-merge-test
Big merge of a couple of weeks' work from the main project back into this branch. :ohno:
2021-10-03 10:49:38 +11:00
Hugh Rundle
eed9d44cfd fix visible_to_user for groups user is a member of 2021-10-02 20:52:19 +10:00
Hugh Rundle
72e00f75c9 send notification when other group members add books to group lists 2021-10-02 20:14:53 +10:00
Hugh Rundle
8708d71f4b group members can see lists
- fix visible_to_user for group objects (like lists)
- temporarily disable privacy_filter on group lists
2021-10-02 18:31:56 +10:00