Wykres commitów

191 Commity (c0b75e4fbd70af0b3d8fb7f987f32c109d498759)

Autor SHA1 Wiadomość Data
Ryan Barrett c0b75e4fbd
Protocol.load: return None if the entity is too big
fixes https://console.cloud.google.com/errors/detail/CO-fpZfMq_6ktgE;time=P30D?project=bridgy-federated
2024-03-11 15:31:31 -07: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 8cb3628270
Protocol.targets: bug fix for self replies 2024-02-12 19:02:00 -08:00
Ryan Barrett ddbd7f3fec
protocol.load: allow an object to switch protocols
fixes https://console.cloud.google.com/errors/detail/CPb-q_DKzvrYOw;time=P30D?project=bridgy-federated
2024-02-10 22:12:44 -08:00
Ryan Barrett 484c637219
authorization check: handle domain vs homepage for web users
for #566
2024-02-10 10:30:25 -08:00
Ryan Barrett 6a63820cd8
tighten Object.owns_id to reject blocklisted domains
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-02-08 14:41:15 -08:00
Ryan Barrett c966090912
Protocol.load: reload objects if our copy is over 30d old
fixes #628

no clue how much this will impact our outbound request load. we'll see!
2024-02-08 11:23:09 -08:00
Ryan Barrett 3bcef0d37d
follow UI: specific error message for trying to follow bridged accounts
thanks for the nudge @campegg!
2024-01-25 17:05:26 -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 6e236e2d70
switch User.ap_actor to id_as, use Web.ap_subdomain property 2023-11-30 17:10:18 -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 ee373095e2
send follow accepts to protocols that support them
for #710
2023-11-27 16:32:22 -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 8f0d2d8650
AP: handle opted out users in following/ers, outbox collections 2023-11-27 11:32:30 -08:00
Ryan Barrett b81fa2090b
Protocol.receive: handle opted out users 2023-11-27 06:53:22 -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 fefcbbb77e
drop Protocol.actor_key's default_g_user kwarg
for #690
2023-11-19 21:53:38 -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 95631396b7
atproto: fill in createdAt
for snarfed/granary@a0795b8c34
2023-11-14 15:24:51 -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 12158eba64
Protocol.targets bug fix, handle composite inReplyTo 2023-11-13 14:08:21 -08:00
Ryan Barrett 0364ece4a8
stop resolving ids in Protocol.targets, since Protocol.receive already did it 2023-11-12 13:21:35 -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 84324c0c0b
Protocol.targets: suppress mentions of in-reply-to authors
fixes #686
2023-11-10 14:39:40 -08:00
Ryan Barrett e801d52ed7
Protocol: add force= to /queue/send, allow unknown params in /queue/receive 2023-11-08 11:28:17 -08:00
Ryan Barrett 06275324fd
Web.convert: call translate_ids 2023-11-03 15:52:37 -07:00
Ryan Barrett fdc5b8e1e9
Protocol.translate_ids bug fix: handle create/update user profile activities 2023-11-03 15:10:05 -07:00
Ryan Barrett def5638a64
Protocol.translate: distinguish between object and user ids 2023-11-02 13:08:24 -07:00
Ryan Barrett 9aff3122c0
noop: rename get_for_copy[ies] => get_for_original[s] 2023-11-02 13:08:23 -07:00
Ryan Barrett 9358bf2fd2
Protocol.translate_ids: minor tweaks, bug fixes, comments 2023-11-01 12:33:38 -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 c280a3f213
switch Protocol.translate_ids from using subdomain_wrap to translate_object_id 2023-10-26 17:18:01 -07:00
Ryan Barrett cfbfba654e
move User.get_for_copy/ies to module level, add Object results 2023-10-26 16:00:03 -07:00
Ryan Barrett 5843235fd1
rename ids.convert_id => translate_user_id, convert_handle => translate_handle 2023-10-26 13:53:31 -07:00
Ryan Barrett f74be7b0e5
add Protocol.convert_wrap 2023-10-26 13:53:31 -07:00
Ryan Barrett 3471476092
Revert "Protocol.receive: bump up threads from 10 to 30"
Seemed to make things worse, not better. Guess I need to implement continuation passing across task handler requests. #652

This reverts commit 66da2efc7a.
2023-10-25 12:31:52 -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 d12fd99b03
noop: move Protocol.subdomain_url to common.subdomain_wrap 2023-10-23 15:44:32 -07:00
Ryan Barrett 16d8832c72
receive: support ?force=true to skip "already seen this id" check 2023-10-19 22:15:14 -07:00
Ryan Barrett 3b88b0f315
AP: don't create "receiving" user in inbox, don't set actor to g.user in send
more iffy kinda scary changes. gulp. important though, baby step toward killing g.user! #690
2023-10-19 16:15:40 -07:00
Ryan Barrett 89cd73831b
rework g.user
* it's always sending user ie actor
* don't pass it to task from atproto.poll_notifications (we were incorrectly passing the receiving user)
* in Protocol.receive, default g.user to actor/author
* in ActivityPub.signed_request, if g.user is ActivityPub, it won't have AP keys, so use default signing user instead

kinda scary and iffy. 🤞🤞🤞
2023-10-18 13:56:53 -07:00
Ryan Barrett e66ca3fb7f
noop: expand a few log messages 2023-10-18 13:13:44 -07:00
Ryan Barrett 9e1acf1cf7
replace copy ids with originals in Protocol.load
honestly not sure if this is necessary yet, and it's moderately expensive, two serial datastore queries with an IN filter. we'll see.
2023-10-18 11:18:20 -07:00
Ryan Barrett efdf84a023
Protocol.receive: replace copy ids with originals, related bug fixes 2023-10-18 11:03:22 -07:00
Ryan Barrett b8c7d1cd96
receive_task: set object.new to force receive to process it 2023-10-18 11:03:21 -07:00
Ryan Barrett fc96959383
tone down logging, especially for polling ATProto notifs 2023-10-18 11:03:21 -07:00