Ryan Barrett
7941b632ca
Object._pre_put_hook: require that protocol owns id
2024-01-12 19:53:01 -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
beb865bc07
web feed fetching: add next poll task
...
use average of time between posts in feed as ETA
for #550
2024-01-01 20:12:33 -10:00
Ryan Barrett
e9a8d81d43
testutil noop: remove unused import
2023-12-29 21:00:08 -08:00
Ryan Barrett
2c19a5a3af
drop obsolete unwrap in Object.as1 when converting from as2
2023-12-02 14:25:38 -08:00
Ryan Barrett
8f7facda97
don't automatically accept follows from protocols that support them natively
...
for #710 . adds per-protocol `HAS_FOLLOW_ACCEPTS` constant
2023-11-27 14:44:05 -08:00
Ryan Barrett
6091cd4063
drop the rest of g.user!
...
for #690
2023-11-25 20:38:28 -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
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
cbbea104fc
cache Protocol.for_id
...
fixes #727
2023-11-13 14:18:32 -08:00
Ryan Barrett
91c25f6955
testutil noop, TestCase.make_user: include source_protocol in profile Object
2023-11-13 14:08:21 -08:00
Ryan Barrett
00fb4dd14d
move test_atproto.KEY to testutil.ATPROTO_KEY
2023-11-13 14:08:21 -08:00
Ryan Barrett
f97b837960
cache follower/following counts for 2h
2023-11-08 12:03:56 -08:00
Ryan Barrett
9327565095
/convert/: drop req't that ids are web URLs
...
for abstracting across protocols. also other minor tweaks.
2023-11-08 11:28:17 -08: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
c280a3f213
switch Protocol.translate_ids from using subdomain_wrap to translate_object_id
2023-10-26 17:18:01 -07:00
Ryan Barrett
dc82fd02e1
TestCase.as2_req: support POSTs with data kwarg
2023-10-26 16:56:30 -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
422a240183
Resolve protocol-subdomain-wrapped ids/URLs by stripping the subdomain wrapping
...
Renames Object.replace_copies_with_originals => resolve_ids. As a side effect, also fixes https://console.cloud.google.com/errors/detail/CK3U3PONxv5Q;time=P30D?project=bridgy-federated
2023-10-24 10:47:44 -07:00
Ryan Barrett
4faf551f8f
testutil: generate activitypub._DEFAULT_SIGNATURE_USER proactively
2023-10-19 13:09:19 -07:00
Ryan Barrett
e486c28919
testutil noop, fix class names in Fake log messages
2023-10-18 11:03:22 -07:00
Ryan Barrett
c1b07acfa5
cloud tasks only
2023-10-18 11:03:22 -07:00
Ryan Barrett
c83c77a73e
authorization: log when authed user doesn't match activity's author/actor
...
for #566 . just logging for now, want to see if we're already hitting this at all.
2023-10-16 11:13:38 -07:00
Ryan Barrett
7466a000a5
testutil: add assertLogs wrapper that enables/disables logs
2023-10-16 10:53:58 -07:00
Ryan Barrett
f3039fc87a
Protocol.send: bring back log_data kwarg
2023-10-13 18:29:28 -07:00
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