Ryan Barrett
f951c143e3
fix tests for 0902994af0
2023-06-12 15:50:47 -07:00
Ryan Barrett
cb1f80832f
AP users: add Protocol.ABBREV, Protocol.OTHER_LABELS
...
for #512
2023-06-11 08:14:17 -07:00
Ryan Barrett
510cd036bf
AP users: add Protocol.for_domain and for_request
...
getting ready to serve per-protocol subdomains, eg nostr.brid.gy, ap.brid.gy, etc
for #512
2023-06-10 19:55:08 -07:00
Ryan Barrett
cb5e7bf8c7
noop, minor protocol generalization and cleanup
...
for #512
2023-06-10 15:07:26 -07:00
Ryan Barrett
c98ab3f2d5
AP users: Object schema change, domains => users
...
also for AP => wm, only try to send webmentions to domains that we already have an existing Web user for. the vast majority of targets are fediverse URLs, and we were trying to send them all wms, ie at least running wm discovery and finding nothing. harmless, but a waste.
2023-06-09 12:56:45 -07:00
Ryan Barrett
05f244b86f
AP => wm follow bug fix: store correct actor_as2, not Follow object
...
🤦
fixes https://console.cloud.google.com/errors/detail/CKOFx6_Wrfzf6wE;time=P30D?project=bridgy-federated
2023-06-09 12:28:13 -07:00
Ryan Barrett
afbb453043
AP users: finish migrating follow.py to Follower schema with new from/to
...
for #512 , fixes https://console.cloud.google.com/errors/detail/CPn404XJ2rC6rAE;time=P30D?project=bridgy-federated
2023-06-07 23:51:41 -07:00
Ryan Barrett
7c82bf7ec5
AP users: finish migrating Follower from string domains/ids to User keys
...
for #512
2023-06-07 19:06:44 -07:00
Ryan Barrett
71dadc2ba5
AP users: ignore webmention sending failures
...
since webmention support is optional for web users: https://fed.brid.gy/docs#error-handling
for #512
2023-06-04 15:11:52 -07:00
Ryan Barrett
daba73ce38
update a few user page links in the web UI, /user/ => /web/
...
for #512
2023-06-03 08:03:38 -07:00
Ryan Barrett
9d1dc652f9
Protocol.load: bug fix, handle Object.as1 going from non-None to None
...
fixes https://console.cloud.google.com/errors/detail/CI3L3MzXjPza9gE;time=P30D?project=bridgy-federated
2023-06-02 21:53:44 -07:00
Ryan Barrett
35060c172a
switch actor_id() and address90 back to User methods, to be implemented by subclasses
...
partially reverts 9e906f18e4
2023-05-31 10:10:14 -07:00
Ryan Barrett
9e906f18e4
move address, actor_id from User to activitypub.py, /web-site to web.py
...
for #512
2023-05-30 17:24:49 -07:00
Ryan Barrett
47b04f5574
rename Web.LABEL from 'webmention' to 'web'
2023-05-30 12:15:36 -07:00
Ryan Barrett
6e834713f1
when replying to Follow with Accept, include original Follow object verbatim
...
notably, including id. fixes #522 (again)
2023-05-29 19:04:26 -07:00
Ryan Barrett
c8b2103e13
rename Webmention class => Web, webmention.py => web.py
2023-05-26 17:40:29 -07:00
Ryan Barrett
eaa4e5333a
start to make User subclasses for each protocol
...
#512
2023-05-26 16:07:36 -07:00
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