Commit graph

52 commits

Author SHA1 Message Date
Mouse Reeve dd72013225 Small fixes for notifications
Adds a link in the text of the notification, and fixes references to
notification type in the model
2023-12-09 08:09:22 -08:00
Mouse Reeve d94b27b723
Merge branch 'main' into user-migration 2023-11-19 19:18:22 -08:00
Adeodato Simó 01d4381898
Create notifications for incoming invite requests
Closes: #2066
2023-11-14 07:09:04 -03:00
Hugh Rundle bbc78f03ae
fix DB migrations (#3111)
fix migrations and linting
2023-11-14 07:21:27 +11:00
Hugh Rundle d5762f1d52
Merge branch 'main' into user-migration 2023-11-13 21:17:07 +11:00
Hugh Rundle 891b72c79c
update user export file to use ActivityPub objects where possible. (#3109)
* add more context to user export page
* fix BookData fields wrong for files
* use to_activity and to_model where possible
* fixes for import and export
- use AP JSON where possible
- minor template wording updates
* import fixes and updates tests
* minor cleanup
* remove todo for mastodon
2023-11-13 21:14:03 +11: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 67822d3cb0
Merge branch 'main' into user-migration 2023-11-05 06:52:48 -08:00
Hugh Rundle 6f3b1b565f
fixes to move layout and notifs
- make Move notifications less complicated
- moved users cannot do anything other than unmove or log out
- refactor translations for moved users
2023-10-27 22:00:04 +11:00
Hugh Rundle ddec2dbaa9
fix tar types notification docstring 2023-10-23 20:43:49 +11:00
Hugh Rundle fd1ebf5f71
formatting and pylint fixes 2023-10-22 16:52:29 +11:00
Hugh Rundle b34a491172
run black 2023-10-22 15:34:25 +11:00
Hugh Rundle 20114b0059
add notifs and error handling for user export/import 2023-10-22 09:03:28 +11:00
Hugh Rundle 5b051631ec
Move MVP
* update User model to allow for moved_to and also_known_as values
* allow users to add aliases (also_known_as) in UI
* allow users to move account to another one (moved_to)
* redirect webfinger to the new account after a move
* present notification to followers inviting to follow at new account

Note: unlike Mastodon we're not running any unfollow/autofollow action here: users can decide for themselves
This makes undoing moves easier.

TODO

There is still a bug with incoming Moves, at least from Mastodon.
This seems to be something to do with Update activities (rather than Move, strictly).
2023-09-18 21:21:04 +10:00
Hugh Rundle e7ba6a3141
initial work to add 'Move' activity 2023-08-29 21:07:41 +10:00
Josh Soref e4677eb6fa spelling: someone
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Mouse Reeve 2470a0fd1c Create notifications for link domains that need approval 2023-02-22 10:20:07 -08:00
Mouse Reeve 1f022496dd Fixes duplicate notification on import 2022-11-07 10:36:31 -08:00
Mouse Reeve 6947f3b787 Uses class method to get list of instance admins
Re-writing this query over and over is a bad approach
2022-09-19 10:43:52 -07:00
Mouse Reeve 235e877b3d Reverse order of notification users lists
Should show newest first
2022-07-14 11:00:05 -07:00
Mouse Reeve f92b4548b1 Fixes get_or_create error when multiple matching notifications exist 2022-07-09 12:30:05 -07:00
Mouse Reeve a972c58f3b Fixes errors in permissions 2022-07-07 14:01:51 -07:00
Mouse Reeve 26a1f75e91 Group notification types by feature 2022-07-06 19:15:48 -07:00
Mouse Reeve 7fe722b595 Fixes follow request notifications
Since the main way to interact with them is by approving them in the
notification, I didn't group them
2022-07-05 15:04:14 -07:00
Mouse Reeve e54c563865 Consistent use of plurals 2022-07-05 14:49:04 -07:00
Mouse Reeve 8cbf8f62c7 List add notifications 2022-07-05 14:15:12 -07:00
Mouse Reeve 41f42e33ed Moves list add notification into notification model
Right now notifications are a mix of post-save signals and clauses in
the save function of the model. I'm not actually sure which is better,
but I'm moving them to signals where it's straightforward to be
consistent.
2022-07-05 13:28:09 -07:00
Mouse Reeve 736d29ea20 Updates group leave and remove notifications 2022-07-05 13:05:28 -07:00
Mouse Reeve 971bed9942 Notification field is read, not unread
Oops
2022-07-04 21:32:35 -07:00
Mouse Reeve 801ba03aaf Keep group as a foreign key field 2022-07-04 20:32:13 -07:00
Mouse Reeve aeefd5a3e9 Use signal for creating group invite notification 2022-07-04 20:24:29 -07:00
Mouse Reeve 03f5a3f2c1 Use enums for notification types 2022-07-04 20:19:18 -07:00
Mouse Reeve b193652a67 Python formatting 2022-07-04 19:58:27 -07:00
Mouse Reeve 62e57ac931 Adds notify and unnotify helper class methods
In the new paradigm, a notification related to a status has users added
to it and removed from it, rather than a new notification being added
every time. These helper functions make this behavior consistent.
2022-07-04 19:48:10 -07:00
Mouse Reeve a9a2da0957 Keep status as a single field 2022-07-04 19:20:04 -07:00
Mouse Reeve a2a04da493 Adds many to many related items to notifications 2022-04-09 09:44:42 -07:00
Mouse Reeve 8d266fda4d Removes unused related_book field on notification model 2022-04-08 15:21:38 -07:00
Mouse Reeve f92863ad3e Notify when import completes 2021-11-14 09:56:23 -08:00
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 1634c8774e remove useless field in Notifications model 2021-10-15 17:59:39 +11:00
Hugh Rundle 90d92edd75 disable pylint on NotificationType now being "too long" 2021-10-05 08:10:23 +11: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 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
Mouse Reeve 50ca3eef31 Encompass all status models in notification signal 2021-09-22 11:10:37 -07:00
Mouse Reeve a4ac25bfae Move notifications to signals 2021-09-22 09:24:39 -07:00
Mouse Reeve 3ade2d3bb1 New version of black, new whitespace 2021-04-26 09:15:42 -07:00
Mouse Reeve e5750de3dd Notify admins when a report is filed 2021-03-16 12:57:23 -07:00
Mouse Reeve 70296e760b Runs black 2021-03-08 08:49:10 -08:00
Mouse Reeve e0cfb009e4 Deduplicate notifications in notification model 2021-02-10 16:21:29 -08:00