Commit graph

46 commits

Author SHA1 Message Date
Hugh Rundle 2c9ebba5d7
fix reject PR
- rationalise activitypub.Reject and fix model being undefined
- fix not being able to follow users from followers page: 'delete' option now in user_options dropdown
- revert bookwyrm.js
- fix delete_follow_request deleting instead of rejecting
- add user id to 'remove-follow' path
2023-11-21 20:13:56 +11:00
Hugh Rundle 2ba0e3d7ff
Allow removing followers and fix follow rejections
* adds the ability to remove a user from your followers list
* fixes verbs.Reject to process reject activities for previously accepted follows in both directions

fixes #2635
2023-11-19 20:03:48 +11:00
Hugh Rundle 01a56540d0
cleanup 2023-09-25 15:29:01 +10:00
Hugh Rundle c95f160216
fix MoveUser errors and clean up
- minor template fixes
- notification logic fixes
- don't dedupe on moved_to or also_known_as
- add migration
2023-09-25 15:14:21 +10: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
Mouse Reeve 779d2b0694 Attempt to complete inbox requests synchronously
When an inbox activity comes in from another fediverse instance, the
behavior prior to this commit was always to immediately give a 200
response to the external server and then create a celery activity
(usually in the MEDIUM_PRIORITY queue) to complete it.

Instead, this would receive a request and try to complete it without
making any http requests (which would make the request take too long to
process). If an external request is required to complete the activity, a
task is created and added to the queue.

Ideally, this will cause some tasks to happen very promptly, and reduce
the load on celery, which would help queued tasks happen more quickly as
well.

One downside is that this will make completing http requests from
external servers slowing (since it's doing a bunch of thinking before
responding).
2023-02-20 11:05:18 -08:00
Andy Maloney e5539a6faf Fix spelling in various comments 2023-01-10 17:24:02 -05:00
Mouse Reeve 18b53a608c More resilient hanlding of deletions 2022-01-30 10:42:29 -08:00
Mouse Reeve 20cca69f06 Test update status via inbox 2021-10-15 08:52:32 -07:00
Mouse Reeve 4479864008 Updates code for linter 2021-06-18 14:12:56 -07:00
Mouse Reeve 3ade2d3bb1 New version of black, new whitespace 2021-04-26 09:15:42 -07:00
Mouse Reeve e9dc63e296 Only remove objects that are known 2021-04-22 09:25:12 -07:00
Mouse Reeve 5df2ac676b Fixes error on deletion requests for unknown users 2021-04-17 12:51:30 -07:00
Mouse Reeve bd294cce83 Check if obj exists for updates 2021-04-16 15:17:55 -07:00
Mouse Reeve caa261f4bf Gracefully handle expect, unsupported activities 2021-04-16 15:12:38 -07:00
Mouse Reeve 2f493336ad Don't try to delete nonexistant objects 2021-04-15 16:24:05 -07:00
Mouse Reeve addcc59d7f Makes cc fields optional
Plus a bit of cleanup in comments and to: fields
2021-04-15 16:21:54 -07:00
Mouse Reeve ddd05a68cf Resolve and assign target collection for collection items 2021-04-08 15:40:02 -07:00
Mouse Reeve 24685187e8 Updates collection item add/remove handlers 2021-04-08 15:22:06 -07:00
Mouse Reeve 98161b9041 Use CollectionItem objects 2021-04-08 14:16:34 -07:00
Mouse Reeve 9acb8e53d8 Adds privacy fields to boost activities 2021-03-24 13:35:49 -07:00
Mouse Reeve 3fe3b0b2d5 Adds published date field to boost activity 2021-03-24 13:25:00 -07:00
Mouse Reeve 08edba4891 Ignore activities that expect dict args but get strs
Some Undo activities are coming from Pleroma with just the id
of the activity, rather than the serialized object. There isn't
an obvious way to know what is being undone, so for now this
just ignores those
2021-03-16 12:00:21 -07:00
Mouse Reeve 6490a55274 Handle incoming follow request cancellations 2021-03-13 15:32:56 -08:00
Mouse Reeve a1d95d5010
Merge pull request #725 from mouse-reeve/incoming-unshelve
Fixes handling incoming unshelve activities
2021-03-13 08:53:37 -08:00
Mouse Reeve e1a8c4d260 Fixes handling incoming unshelve activities 2021-03-13 08:43:36 -08:00
Mouse Reeve 2548ba926a Fixes error when receiving Undo for unknown boost 2021-03-13 07:15:30 -08:00
Mouse Reeve 70296e760b Runs black 2021-03-08 08:49:10 -08:00
Mouse Reeve 6e6bcb2f48 gotta simplify the add activity 2021-02-23 15:51:02 -08:00
Mouse Reeve fb98ef4b38 Remove redundant activitypub dataclass 2021-02-19 11:16:01 -08:00
Mouse Reeve d81bfb6573 Fixes unfollow 2021-02-16 16:35:28 -08:00
Mouse Reeve 3f1b62eb98 Fixes Add activity
still janky
2021-02-16 11:04:13 -08:00
Mouse Reeve 08c1553e71 Fixes Favs 2021-02-15 21:41:08 -08:00
Mouse Reeve 606d89d3bd Fixes boost, recursive to_model calls 2021-02-15 21:20:00 -08:00
Mouse Reeve a16b81a6eb Adds actions for all verbs 2021-02-15 20:49:23 -08:00
Mouse Reeve 12a3aa9667 incoming Create flow with tests 2021-02-15 19:41:22 -08:00
Mouse Reeve 81e2021f92 Move handlers to activitypub classes 2021-02-15 18:47:08 -08:00
Mouse Reeve 5f7466e92d Fixes bugs in how lists/shelves federate Adds 2021-02-10 19:17:16 -08:00
Mouse Reeve e53b4e57fa Federating lists and shelves 2021-02-02 09:37:46 -08:00
Mouse Reeve cc8888dea2 Adds incoming handler for blocking 2021-01-23 11:03:10 -08:00
Mouse Reeve da05b99bb8 Fixes incoming shelve activity 2020-12-15 18:57:17 -08:00
Mouse Reeve a93b5cf5bc Use remote_id resolver to load books, user 2020-11-28 10:18:24 -08:00
Mouse Reeve 301a452d9f Send Delete activity, not Tombstone on deletion 2020-10-31 11:04:19 -07:00
Mouse Reeve d689b6e7c4 Adds Delete verb 2020-10-14 08:38:51 -07:00
Mouse Reeve f77c156733 rename main code directory 2020-09-17 13:30:54 -07:00
Renamed from fedireads/activitypub/verbs.py (Browse further)