Wykres commitów

24 Commity (cf86f4d8081a1d142375e233633f196e3d793b2b)

Autor SHA1 Wiadomość Data
Ryan Barrett cf86f4d808
AP users: extract out Protocol.serve() method
#512
2023-05-23 21:30:57 -07:00
Ryan Barrett 892047a10c
add Protocol metaclass and protocol.protocols global for storing subclasses 2023-05-23 15:15:28 -07:00
Ryan Barrett d2ab48b23e
switch circular imports to runtime imports; split out flask_app.py from app.py
runtime imports are just as bad, but...meh. eventually I'll untangle them for real. #486
2023-04-18 17:18:17 -07:00
Ryan Barrett 212f2b11ec
wm => AP: add delete support
fixes #30
2023-04-17 15:36:29 -07:00
Ryan Barrett 629c1a2bd4
unify Object.new/changed generation into Protocol.load
also:
* switch back to preserving fragments in URL ids
* webmention.fetch: if URL id redirects, preserve original id in Object
2023-04-03 07:53:15 -07:00
Ryan Barrett 3a97ba587d
noop: Protocol.load: switch from @cached decorator to manual cache
...so that I can add a refresh kwarg that bypasses the cache
2023-04-02 20:36:23 -07:00
Ryan Barrett e41ce9216c
noop, rename Protocol.get_object => Protocol.load 2023-03-29 13:13:32 -07:00
Ryan Barrett e6be9cabb8
incoming AP: when we can't load the keyId, store a deleted Object
prevents re-fetching the same failing keyId actor over and over when we get the same Delete actor activity sent to all of our inboxes
2023-03-29 12:51:37 -07:00
Ryan Barrett 5493e2f297
add 'activity' to Object.labels automatically in new _pre_put_hook 2023-03-28 11:14:08 -07:00
Ryan Barrett 68de408789
Protocol.get_object(): store object before returning
also flesh out FakeProtocol

hopefully helps with https://console.cloud.google.com/errors/detail/CKCN17fmoZHraw;time=P30D?project=bridgy-federated , don't really know though
2023-03-27 14:14:37 -07:00
Ryan Barrett 28e8baff6c
change Protocol.fetch() to return an Object instead of populating one 2023-03-22 20:49:28 -07:00
Ryan Barrett acf474e2a9
standardize fetch(id, obj) args 2023-03-20 19:25:05 -07:00
Ryan Barrett 88dd51b05b
continue abstracting logic in Protocol class
lots more to do.

also convert Object.as1 to AS2 in ActivityPub.send if necessary.
2023-03-20 19:17:55 -07:00
Ryan Barrett fb5f7b3fb0
move current user into Flask g request-global 2023-03-20 14:28:14 -07:00
Ryan Barrett b2c60226b7
add Webmention.send, tweak method signature 2023-03-20 11:26:43 -07:00
Ryan Barrett bf15f4ca95
fix wm => AP reposts
fixes #453
2023-03-19 16:21:44 -07:00
Ryan Barrett 5e3c623552
add User.actor_id() 2023-03-19 09:34:42 -07:00
Ryan Barrett 6ce9a83181
don't add notification label unless an activity involves the user
for #442 (ish)
2023-03-13 20:38:46 -07:00
Ryan Barrett 71174b69f9
don't deliver replies to followers
also start new test_protocol file. fixes #444.
2023-03-13 17:25:10 -07:00
Ryan Barrett 01768fd58e
move accept_follow from activitypub to protocol 2023-03-11 13:01:23 -08:00
Ryan Barrett 9cc8451182
fix webmention endpoint discovery cache key
#423
2023-03-11 12:14:48 -08:00
Ryan Barrett 76e26a7c2c
cache webmention endpoint discovery for 2h 2023-03-10 22:24:58 -08:00
Ryan Barrett deb4b12659
AS2: short circuit out on Delete actor that we don't have stored
...since when we try to fetch the actor to get their key to verify the signature, we get an HTTP 410 response, at least from Mastodon.
2023-03-10 07:36:50 -08:00
Ryan Barrett ffd8810b44
start to separate logic from protocols with new Protocol/ActivityPub classes
for #388
2023-03-10 07:36:50 -08:00