Commit graph

29 commits

Author SHA1 Message Date
Bart Schuurmans 4f58b11330 Include the correct protocol and port in remote IDs 2024-04-24 15:35:19 +02:00
Adeodato Simó 99a9dbe5f4
Create NotificationType as class, not through API
This way, we need not list every value again to create the enum.

N.B.: enum values are now accessed as `models.NotificationType.FOO`,
instead of `models.Notification.FOO`.
2023-11-09 22:43:36 -03:00
Mouse Reeve aeefd5a3e9 Use signal for creating group invite notification 2022-07-04 20:24:29 -07:00
Mouse Reeve 72a8229a5c Updates group notifications 2022-07-04 20:05:39 -07:00
Mouse Reeve a3d5acc70c Model name in comment 2021-12-10 12:46:40 -08:00
Mouse Reeve 73e09f8d18 Use transaction decorator on group accept 2021-12-10 12:03:18 -08: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 726217577f linting 2021-10-10 13:18:16 +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 05bde27944 remove commented out code 2021-10-08 18:46:30 +11: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 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 832a9b9890 fix group local_path
as per Lists, we need to override get_remote_id to remove the user from the URL
2021-10-02 16:54:44 +10:00
Hugh Rundle 52a083a907 revert name change for Group, GroupMember
these were named as BookwyrmGroup and BookwyrmGroupMember due to a misunderstanding about related_name and a dodgy development environment. This naming makes more sense.
2021-10-02 16:52:34 +10:00
Hugh Rundle 21e6ed7388 complete group notifications
- notify group members when a new member accepts an invitation
- notify all group members when a member leaves or is removed
- notify ex-member when they are removed
2021-10-02 15:48:55 +10:00
Hugh Rundle 89dea44614 accepting membership fixes
- don't delete the invitation twice
- send membership information properly to notification
2021-10-02 12:29:01 +10:00
Hugh Rundle 2f42161dda disambiguate groups and prep for group invitations
- rename Group to BookwyrmGroup
- create group memberships and invitations
- adjust all model name references accordingly
2021-10-02 10:10:37 +10:00
Hugh Rundle 66494e7788 fix reverse reference to user bookwyrm_groups 2021-09-28 18:53:11 +10:00
Hugh Rundle df5a5f94a1 fix local_path for groups 2021-09-27 19:27:39 +10:00
Hugh Rundle f3181690a2 change group owner from 'manager' to 'user'
This will allow privacy management to use existing code.
Some template updates also are for rationalising how
groups are created and edited.
2021-09-27 15:36:41 +10:00
Hugh Rundle 686198472d update group and list models
- remove GroupList model
- add a group foreign key value  to List model
- remove reference to lists in Group model
2021-09-26 15:50:15 +10:00
Hugh Rundle b645d75303 add and remove users from groups 2021-09-25 17:34:44 +10:00
Hugh Rundle b74cd37096 add models for groups 2021-09-24 07:49:54 +10:00