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
Ryan Barrett
cb1f80832f
AP users: add Protocol.ABBREV, Protocol.OTHER_LABELS
...
for #512
2023-06-11 08:14:17 -07:00
Ryan Barrett
cb5e7bf8c7
noop, minor protocol generalization and cleanup
...
for #512
2023-06-10 15:07:26 -07:00
Ryan Barrett
788da1fe66
suppress bs4.MarkupResemblesLocatorWarning in WebTest.test_create_author_only_url
...
```
local/lib/python3.9/site-packages/bs4/__init__.py:435: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
```
2023-06-08 21:21:40 -07:00
Ryan Barrett
0bcd63af04
testutil: hide stdlib and virtualenv lines in test failures tracebacks
2023-06-07 19:06:50 -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
4d2f26eff0
noop test refactoring: convert test_web test data from self attrs to constants
...
long overdue!
2023-06-05 19:06:21 -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
56f18f5d9a
AP users: make User.ap_actor/ap_address abstract, implement in subclasses
...
for #512
2023-05-31 10:47:09 -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
93f621aaf5
AP users: start to replace external with indirect, starting with webfinger
...
#512
2023-05-29 20:16:15 -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