Ryan Barrett
30debfc8fa
cache outbound HTTP request responses, locally to each inbound request
...
using requests-cache. pretty straightforward! for #588
2024-03-08 12:34:49 -08:00
Ryan Barrett
7c5496113f
fix a few tests that were using the network
2024-03-04 16:35:38 -08:00
Ryan Barrett
0610c3c175
activitypub.actor: check enabled protocols
2024-02-29 12:52:49 -08:00
Ryan Barrett
d2865fdb86
add common.ENABLED_BRIDGES, check before conversion and /bridge-user
2024-02-28 12:07:06 -08:00
Ryan Barrett
942452f176
AP: ignore unlisted posts
...
for #832
2024-02-27 12:05:18 -08:00
Ryan Barrett
9489204d64
AP: add profile to Content-Type: application/ld+json
...
for #895
2024-02-27 11:38:00 -08:00
Ryan Barrett
8288390cfd
AP inbox delivery, Protocol.receive: error on blocklisted ids
...
fixes https://console.cloud.google.com/errors/detail/CN278MyjhZbtOQ;time=P30D?project=bridgy-federated , https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-02-27 06:42:19 -08:00
Ryan Barrett
95e5f6d596
test_activitypub noop, prune mock responses
2024-02-10 10:30:24 -08:00
Ryan Barrett
21ba279b31
ActivityPub.convert: fill in context in obj.as2
2024-01-28 18:15:37 -08:00
Ryan Barrett
fcef6c21ab
Revert "heuristic: assume no AP actor id is the root path on its host"
...
This reverts commit b7e890b4bb
.
it was a nice idea, but we're now hitting AP actor ids that are the root path on their host. this is evidently how microblog.pub does AP; 0x3b0b's site https://bw3.dev/ is an example. general info on https://docs.microblog.pub/user_guide.html#activitypub but not this specifically.
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-01-26 12:59:54 -08:00
Ryan Barrett
8ab09511bd
bug fix for following from web UI with custom username
...
thanks again for reporting @campegg!
2024-01-26 06:52:03 -08:00
Ryan Barrett
a832a4edf6
follow UI: error on bridged accounts
...
also make ActivityPub.owns_handle return False for bridged accounts
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-01-15 07:57:03 -08:00
Ryan Barrett
b6989a4f2e
if a web user has the webfinger redirects, use AS2 type Person, not Application
2024-01-14 13:53:28 -08:00
Ryan Barrett
7941b632ca
Object._pre_put_hook: require that protocol owns id
2024-01-12 19:53:01 -08:00
Ryan Barrett
e9194b0a66
AP: default actors to type Application, add disclaimer with links to profile bio
...
thanks for the nudge @fromjasonstuff!
2024-01-11 16:37:10 -08:00
Ryan Barrett
bab5270c3b
start clearing Object.our_as1 again on updates
...
fixes #778 . bug was that when we fetched a web object, we'd populate the new `mf2` value, but still keep the old `our_as1`, which then overrode it in `as1`. ugh.
partially reverts commit 62ca4022fb
for #721 .
2024-01-08 13:03:44 -08:00
Ryan Barrett
26de4097ae
AP: switch default signing actor to real fed.brid.gy instance actor
...
https://seb.jambor.dev/posts/understanding-activitypub-part-4-threads/#the-instance-actor
2024-01-06 11:59:31 -10:00
Ryan Barrett
2fafd83344
ids.translate_user_id: handle Web.ap_subdomain
...
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:04:01 -08:00
Ryan Barrett
b999cfe59a
ActivityPub.convert bug fix: don't call postprocess_as2_actor without user
...
fixes https://console.cloud.google.com/errors/detail/CKmOubHj-8H84AE;time=P30D?project=bridgy-federated
2023-12-14 15:48:02 -08:00
Ryan Barrett
d538928fe6
activitypub.postprocess_as2_actor: bug fix for publicKey w/Web.ap_subdomain
2023-12-01 13:06:59 -08:00
Ryan Barrett
6e236e2d70
switch User.ap_actor to id_as, use Web.ap_subdomain property
2023-11-30 17:10:18 -08:00
Ryan Barrett
520b2fd3b0
User.ap_address() => handle_as(ActivityPub)
2023-11-29 21:06:55 -08:00
Ryan Barrett
e079cec77c
ActivityPub.convert: omit acct: URIs
...
for #738 , https://github.com/Automattic/wordpress-activitypub/issues/571
2023-11-29 14:51:56 -08:00
Ryan Barrett
62ca4022fb
stop clearing Object data properties
...
...so that we have original data preserved when we override it in our_as1. fixes #721
2023-11-28 06:39:34 -08:00
Ryan Barrett
8f0d2d8650
AP: handle opted out users in following/ers, outbox collections
2023-11-27 11:32:30 -08:00
Ryan Barrett
d7d55864ad
activitypub.actor bug fix: handle opted out users
...
fixes https://console.cloud.google.com/errors/detail/CKOs59zx0rSXQg;time=P30D?project=bridgy-federated
2023-11-26 15:44:43 -08:00
Ryan Barrett
03315891aa
drop a lot of g.user
...
for #690
2023-11-25 20:23:19 -08:00
Ryan Barrett
1591dfb641
pass user to Protocol.send/convert instead of using g.user
...
for #690
2023-11-25 20:07:14 -08:00
Ryan Barrett
e947891d75
Protocol.receive: fail if incoming activity doesn't have actor or author
...
for #690
2023-11-25 14:50:08 -08:00
Ryan Barrett
69ac7eabca
activitypub: move postprocess_as2_actor out of postprocess_as2
...
...and into ActivityPub.convert and actor handler directly. for #690
2023-11-24 09:20:52 -08:00
Ryan Barrett
ee571e5b25
activitypub: move compacting actors from postprocess_as2 to convert
...
for #690
2023-11-24 08:34:39 -08:00
Ryan Barrett
33c5c3a4d2
AP: add HEAD support to followers/ing, outbox collections
...
for #383
2023-11-23 22:41:52 -08:00
Ryan Barrett
579f55d965
AP: add paging to outbox
...
finishes / fixes #383
2023-11-23 22:35:38 -08:00
Ryan Barrett
db2668ffab
activitypub.postprocess_as2_actor: handle user without handle
...
fixes https://console.cloud.google.com/errors/detail/CIT9-r3d-MKW5AE;time=P30D?project=bridgy-federated
2023-11-23 22:09:11 -08:00
Ryan Barrett
e5abdc097f
implement outbox
...
only first page. for #383
2023-11-22 21:40:36 -08:00
Ryan Barrett
f6af56f1c4
test_activitypub: use our_as1 for test web user, not as2
2023-11-22 17:59:18 -08:00
Ryan Barrett
b255962fde
activitypub: genericize preferredUsername across protocols
2023-11-22 17:24:08 -08:00
Ryan Barrett
9b67d5273f
remove g.user in a few more places in activitypub
...
for #690
2023-11-20 16:21:20 -08:00
Ryan Barrett
4d095fa3d9
misc cleanup
...
* remove obsolete TODOs, commented out code
* remove obsolete circular imports of per-protocol modules
* minimize Object put in Protocol.load
* remove duplicated Protocol.load tests in test_activitypub
* re-enable rest of ActivityPubUtilsTest.test_postprocess_as2_idempotent
* drop default cls=Web in TestCase.make_user
2023-11-15 14:23:08 -08:00
Ryan Barrett
2a7c0adf0f
bug fixes for suppressing mentions of in-reply-to-authors
...
for 84324c0c0b
, #686
2023-11-11 14:52:21 -08:00
Ryan Barrett
242a4a3ad3
fix activitypub actor tests for ae2cb2825b
2023-11-08 11:53:32 -08:00
Ryan Barrett
bca034c4f8
ids: use subdomain-wrapped URLs to convert ATProto to Web/AP
2023-11-06 20:17:23 -08:00
Ryan Barrett
aa5c6a396e
ActivityPub: translate ids in convert
2023-11-03 15:11:21 -07:00
Ryan Barrett
625eb66d53
AP actor ids: redirect web and fed.brid.gy/ap/[domain] to fed.brid.gy/[domain]
2023-11-03 06:53:33 -07:00
Ryan Barrett
db646909e2
delivery: switch from threads to tasks, one per send
...
for #652
2023-10-31 12:49:27 -07:00
Ryan Barrett
b7e890b4bb
heuristic: assume no AP actor id is the root path on its host
...
this lets us assume home pages are Web users without making any network requests
2023-10-26 17:58:10 -07:00
Ryan Barrett
43424259a5
noop: use as2.PUBLIC_AUDIENCE more in test_activitypub
2023-10-26 13:53:31 -07:00
Ryan Barrett
ca8b7484c0
drop User.as2, Object.as_as2, switch callers to Protocol.convert
2023-10-25 13:28:01 -07:00
Ryan Barrett
acb1c703a3
rename Protocol.serve => .convert, move Content-Type to class constant
2023-10-25 12:31:52 -07:00
Ryan Barrett
6a867ca2c4
update for granary.as2's new PropertyValue attachment handling
...
snarfed/granary@20d6c3f065
2023-10-24 16:02:16 -07:00