Wykres commitów

200 Commity (3691b9c32b08f693ad5ec778f6dacdbb0ddbdf00)

Autor SHA1 Wiadomość Data
Ryan Barrett 5767ffabb5
add new Object.normalize_ids method, use in Protocol.receive
eg https://bsky.app/... URLs to DIDs for actors or at:// URIs for objects

this hopefully fixes web => ATProto follows of https://bsky.app/... profile URLs.
2024-04-09 13:07:57 -07:00
Ryan Barrett c57e905204
Protocol.for_id: add remote kwarg 2024-04-09 10:48:05 -07:00
Ryan Barrett 5c470a4647
consider opted out Web domains in ActivityPub.status, not is_blocklisted
follow-up to df321234c0
2024-03-31 18:50:01 -07:00
Ryan Barrett df321234c0
load and include Web.manual_opt_out users in Protocol.is_blocklisted 2024-03-28 09:18:35 -07:00
Ryan Barrett 878bbde328
atproto: handle bsky.app URLs in load, not fetch 2024-03-14 15:40:25 -07:00
Ryan Barrett 9b2bb9ef37
make ATProto.load([DID]) return the profile record by default
add did_doc kwarg to make it return the DID doc instead
2024-03-13 16:08:08 -07:00
Ryan Barrett 7bf29d411f
atproto: only enable indieweb.org and snarfed.org, for now 2024-03-13 13:07:30 -07:00
Ryan Barrett 663063e06c
test_integrations: add ATProto => Web follow 2024-03-12 21:41:05 -07:00
Ryan Barrett c9c74ac6b3
suppress many Protocol.load logging messages 2024-03-12 11:12:34 -07:00
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