Ryan Barrett
84e9b2bcfd
AP: strip @context from Object.as2 before storing in datastore
...
we don't do LD, and many other servers' @contexts are big, so this saves disk space.
fixes #426
2023-10-11 16:35:05 -07:00
Ryan Barrett
cc62d4cdb1
user page redesign: feeds bug fix, fix tests
2023-10-11 12:25:38 -07:00
Ryan Barrett
59abcb00bc
Protocol.send: drop log_data kwarg
...
protocols are responsible for logging objects themselves
2023-10-07 12:54:32 -07:00
Ryan Barrett
7e7962fe45
add orig_obj kwarg to Protocol.send
2023-10-07 12:49:39 -07:00
Ryan Barrett
4909c0814e
deliver self-replies to all followers
...
fixes #639
2023-10-06 14:59:47 -07:00
Ryan Barrett
a9fcc167f6
replace User.readable_id computed property with handle
2023-09-25 15:08:14 -07:00
Ryan Barrett
9b8b02e99f
consolidate ap_address in ATProto, Fake, Web (partially) into User
2023-09-25 12:45:47 -07:00
Ryan Barrett
e9e8827ef9
standardize more on 'handle' and 'id' terms
...
* User.readable_id => handle
* User.readable_or_key_id => handle_or_id
2023-09-25 12:33:24 -07:00
Ryan Barrett
6cdb04b53f
replace User.atproto_handle with handle_as('atproto')
2023-09-25 10:58:05 -07:00
Ryan Barrett
40ba007e9e
add User.handle()
2023-09-25 10:58:05 -07:00
Ryan Barrett
325f8b3931
AP actor serving: resolve handles
2023-09-23 14:57:26 -07:00
Ryan Barrett
6c87254efb
tests: make Fake handles use fake:handle: prefix
2023-09-22 14:53:56 -07:00
Ryan Barrett
169f8d7a2c
add Protocol.handle_to_id, implement in all protocols
2023-09-22 13:11:15 -07:00
Ryan Barrett
0d33b6422d
add Protocol.owns_handle (and in subclasses)
2023-09-22 12:17:42 -07:00
Ryan Barrett
5214c77f6a
Protocol.targets: find and add originals for targets that are copies
...
both Object and User originals
2023-09-19 21:52:28 -07:00
Ryan Barrett
f7792f81c8
tasks: add user param to receive, make create_task run inline in local server
2023-09-19 11:15:49 -07:00
Ryan Barrett
cae19172c9
Protocol: add receive task handler
2023-09-18 19:19:59 -07:00
Ryan Barrett
afda648a4a
tests: extract out assert_task() method
2023-09-13 14:36:24 -07:00
Ryan Barrett
fd6e371635
make Protocol._targets use per-protocol blocklist check
2023-09-09 15:11:52 -07:00
Ryan Barrett
165a403353
drop User.k256_pem, use arroba's AtpRepo.signing_key/rotation_key instead
2023-09-08 21:52:46 -07:00
Ryan Barrett
0bb1038c3a
updates for appengine_info changes, LOCAL => LOCAL_SERVER etc
...
snarfed/webutil@722053854a through snarfed/webutil@86d89bd3df
2023-09-07 12:01:43 -07:00
Ryan Barrett
70edf4173e
ATProto: when creating new repo, add user profile record if available
2023-09-01 14:18:50 -07:00
Ryan Barrett
abf583952c
first pass at ATProto.send
2023-09-01 12:07:21 -07:00
Ryan Barrett
3ff42f0cd4
User.p256_key = k256_key, for ATProto
2023-09-01 07:51:23 -07:00
Ryan Barrett
96b63487fa
implement ATProto.fetch for DIDs
2023-08-30 20:59:53 -07:00
Ryan Barrett
9211aa3cae
bug fixes for Object.clear and get_or_create
...
be more careful about clearing and preserving as2/mf2/bsky/our_as1 properties
discovered by @jamietanna, thanks for reporting Jamie!
2023-08-08 10:26:00 -07:00
Ryan Barrett
b2b5383271
fix authors in RSS and Atom feeds
2023-07-28 15:53:56 -07:00
Ryan Barrett
414fa5f197
Protocol.receive: resume existing create if it's not complete
2023-07-24 14:07:44 -07:00
Ryan Barrett
57350ab81a
switch from Object.users + labels to users + notify + feed lists
...
needed to distinguish an activity's owners from who it should notify from who should see it in their feeds.
also, unrelated, start sending stop-following activities.
in progress, test_web and test_activitypub still need updating.
2023-07-17 05:34:56 -10:00
Ryan Barrett
e194ccb3ad
Protocol.load/fetch returns True/False (or None) to mean "not this protocol"
...
ie, nothing failed, but the given id eitehr doesn't below to the given protocol, or fetched successfully but its data belongs to a different protocol.
vs raising exceptions for fetches that fail or error, eg network connection problems, Web got HTML with microformats2 but no h-entry, ActivityPub got non-AS2, etc.
used in Protocol.for_id: when a given Protocol's fetch doesn't work, we move on and try the next protocol _if_ it returned False (ie wasn't fetchable with that protocol, but we fail fast if it raises an exception (ie fetch failed).
2023-07-14 12:58:47 -07:00
Ryan Barrett
0e47918a38
merging receive: skip same-protocol deliveries and Followers
...
for #529
2023-07-13 14:21:13 -07:00
Ryan Barrett
cfa43135a5
Web.fetch default author bug fix, only add if URL is not homepage
2023-07-11 13:25:31 -07:00
Ryan Barrett
9c62786f06
merging receive: delivery bug fix, stop suppressing webmention send errors
...
for #529
2023-07-11 13:25:30 -07:00
Ryan Barrett
ee3a596dbb
Summary merging Protocol/Web receive: change receive to take Object
...
for #529
2023-07-11 13:25:29 -07:00
Ryan Barrett
83f069ac0f
merging Protocol/Web receive: more follow tests
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
54881ea707
lots more on merging Protocol/Web receive and deliver
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
be7aa50eac
start merging web.webmention_task into Protocol.receive
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
40ae3dec8e
start to port test_activitypub tests to test_protocol, using Fake protocol
...
also minor tweaks to Protocol.deliver
2023-06-27 09:48:47 -07:00
Ryan Barrett
9140318f4a
generalize Protocol.accept_follow, other bug fixes in Protocol.receive
...
for #529 , fixes https://console.cloud.google.com/errors/detail/CMbJ6a6j56LErwE;time=P30D?project=bridgy-federated
2023-06-26 20:22:55 -07:00
Ryan Barrett
cba4845394
disable ndb in-memory cache
...
it has a bug/weird behavior that we want to avoid, at least for now.
https://github.com/googleapis/python-ndb/issues/888
https://github.com/snarfed/bridgy-fed/issues/558
2023-06-22 14:27:02 -07:00
Ryan Barrett
d73206c7c5
*.target_for() bug fix: don't assert that source_protocol matches
...
ugh. ideally we should keep these, but we have existing entities in prod that don't match, eg ActivityPub https://indieweb.social/users/bismark has source_protocol webmention.
fixes https://console.cloud.google.com/errors/detail/CMT-oN6iy7DMwwE;time=P30D?project=bridgy-federated
2023-06-21 07:38:36 -07:00
Ryan Barrett
9467f38180
generalize wm => AP delivery logic across protocols!
...
phew! another tough one. #529
2023-06-20 20:59:32 -07:00
Ryan Barrett
4954a361e0
implement Fake.target_for
2023-06-17 14:12:43 -07:00
Ryan Barrett
99bb564209
drop User.actor_as2
...
for #547
2023-06-16 13:28:33 -07:00
Ryan Barrett
d3c4415cd3
migrate User.actor_as2 to obj key pointing to Object
...
for #547
2023-06-15 21:23:31 -07:00
Ryan Barrett
bbcb8de44a
noop test refactoring: finally unify request context push/pop into testutil
2023-06-15 15:09:03 -07:00
Ryan Barrett
60a4a2bb9f
move domain non-TLD validation from webfinger into Web
...
fixes https://console.cloud.google.com/errors/detail/CMG7h4PJju67Og;time=P30D?project=bridgy-federated
2023-06-15 11:25:31 -07:00
Ryan Barrett
48c40c10a8
add Protocol.for_id and .owns_id
...
fixes #548
2023-06-13 13:21:30 -07:00
Ryan Barrett
f951c143e3
fix tests for 0902994af0
2023-06-12 15:50:47 -07:00
Ryan Barrett
0902994af0
webfinger: infer protocol from brid.gy subdomain in request or resource
...
first commit for inferring protocol. exciting! for #512
2023-06-12 15:50:00 -07:00