Ryan Barrett
e6f72f33b6
Web.load: default check_backlink kwarg to False, pass it through to fetch
2023-06-13 20:24:42 -07:00
Ryan Barrett
48c40c10a8
add Protocol.for_id and .owns_id
...
fixes #548
2023-06-13 13:21:30 -07:00
Ryan Barrett
3448ec7368
AP users: generalize receiving class in Protocol.receive
...
for #512
2023-06-12 19:01:50 -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
6796b47a9f
noop: move web.NoMicroformats to common, misc other minor cleanup
2023-06-10 07:53:07 -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
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
9cb8c1f9f2
AP users: start migrating Follower from string domains/ids to User keys
...
for #512
2023-06-07 12:43:48 -07:00
Ryan Barrett
51c2773594
AP users: /r/: switch external user to indirect user
...
for #512
2023-06-04 20:58:21 -07:00
Ryan Barrett
47b3dd29d0
AP users: minor tweak, include full @context in indirect users' actors
...
for #512
2023-06-04 07:33:30 -07:00
Ryan Barrett
fe27742b80
AP users: promote ActivityPub.label_id computed prop to User.readable_id
...
and drop ActivityPub.get_by_id() override, move logic to user() page handler. fixes 'Only ancestor queries are allowed inside transactions.'
for #512
2023-06-03 21:48:15 -07:00
Ryan Barrett
cf68c1ebc7
AP users: fill in more fields in base actor objects
...
working on Mastodon account discovery interop. for #512
2023-06-03 08:36:55 -07:00
Ryan Barrett
c41b55a199
Web.fetch: switch back to raising instead of returning empty Object
...
raise new custom NoMicroformats exception
2023-06-03 07:28:01 -07:00
Ryan Barrett
d9cd5d14b9
AP users: fetch user on demand on /[actor] if we don't already have it
...
also change Web.fetch() to allow missing mf2 instead of raising exception. we now create Web users with None for mf2 property if the site has no mf2.
for #512
2023-06-02 12:55:07 -07:00
Ryan Barrett
e05ddb0a45
AP users: serve ActivityPub user page with address (handle) in URL
...
eg /activitypub/@me@instance.com
for #512
2023-06-01 22:00:47 -07:00
Ryan Barrett
ca64793fff
AP users: add User.name() and label_id(), ActivityPub.address computed property
...
for #512
2023-06-01 21:37:58 -07:00
Ryan Barrett
17ed24b6f5
AP users: switch ActivityPub.ap_address() to use as2.address()
...
for #512
2023-06-01 20:58:42 -07:00
Ryan Barrett
958f81ddd1
AP users: rename [is_]homepage => [is_]web_url, move into Protocol subclasses
...
for #512
2023-05-31 18:47:40 -07:00
Ryan Barrett
28eabd07a3
create AP users on inbox delivery for an indirect or nonexistent Web user
...
for #512
2023-05-31 13:17:17 -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
29f1a1d4ac
AP users: start parameterizing URLs, including UI pages and AP endpoints
...
user pages now have /[protocol]/ prefix, AP endpoints have /ap/ prefix. for #512
2023-05-30 16:38:58 -07:00
Ryan Barrett
72024f90b1
bug fix for application/ld+json content type
...
fixes #522
2023-05-28 08:06:36 -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
f933c7e237
AP users: serve AS2 for external homepage URLs
...
#512
2023-05-22 23:17:42 -07:00
Ryan Barrett
5aba64004f
wm => AP: inline most objects as bare string ids, not composite objects
...
for interop
2023-04-19 16:21:21 -07:00
Ryan Barrett
d9b1223392
wm => AP: fix reposts from h-cites that turn into composite objects
...
instead of bare string id objects. thanks @gRegorLove for reporting!
2023-04-19 14:37:42 -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
ba38d6853b
bug fixes for hs2019 HTTP Signatures algorithm, hard coding to rsa-sha256
2023-04-17 11:15:05 -07:00
Ryan Barrett
842f8ac964
temporary: assume HTTP Signature algorithm=hs2019 means rsa-sha256
...
still trying to figure this out. see https://github.com/snarfed/bridgy-fed/issues/430#issuecomment-1510462267 , https://arewehs2019yet.vpzom.click/ , etc.
2023-04-16 16:35:31 -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
f836762b0f
big webmention.py refactoring
...
* use Objects properly
* use Object's mf2/AS2/AS1 conversion
* drop resuming partially completed deliveries
* use load, fetch, send
* get closer to unifying all activity handling into Protocol.receive
2023-04-01 19:13:51 -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
754a6eb651
minor noop tweaks: dupe test, test name, docstring
2023-03-27 14:18:24 -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
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
d433dd3abe
wm => AP: switch actors in outgoing activities from objects to string ids
...
mostly. also inlines single-element attributedTo lists to just the element, without the list.
2023-03-19 09:34:42 -07:00
Ryan Barrett
5169c2e44e
misc noop tweaks, mostly tests
2023-03-19 09:34:42 -07:00
Ryan Barrett
5e3c623552
add User.actor_id()
2023-03-19 09:34:42 -07:00
Ryan Barrett
be54842ce6
docs for hashtags
...
#45
2023-03-14 15:36:18 -07:00
Ryan Barrett
ce37dd8637
process hashtags in tab objects with Mastodon-specific logic
...
lots of background in #45 . also https://docs.joinmastodon.org/spec/activitypub/#properties-used
2023-03-14 14:59:28 -07:00
Ryan Barrett
01768fd58e
move accept_follow from activitypub to protocol
2023-03-11 13:01:23 -08:00
Ryan Barrett
bd748f5db1
bug fix for deb4b12659
...
fixes https://console.cloud.google.com/errors/detail/CNrPlPDIlZ-CUA;time=P30D?project=bridgy-federated
2023-03-10 07:49:41 -08:00