Wykres commitów

218 Commity (b9551c4de716cc99a3a068aa9600eae59ca5a295)

Autor SHA1 Wiadomość Data
Ryan Barrett b9551c4de7
adjust Web.owns_id to say it owns protocol bot user domains but not their pages
eg bsky.brid.gy True, https://bsky.brid.gy/ True, https://bsky.brid.gy/foo False.

also move our internal synthetic UI-initiated follow ids from https://fed.brid.gy/web/... to under the user's own domain. hopefully this won't break anything 🤞
2024-04-22 11:58:01 -07:00
Ryan Barrett 10023d17fd
Protocol.enable_protocol: create copy user if necessary 2024-04-21 12:18:12 -07:00
Ryan Barrett 6b597c90c3
User.get_or_create: abstract propagate and create_for across protocols 2024-04-21 11:40:13 -07:00
Ryan Barrett f357ea1698
ActivityPub: accept non-public DMs to protocol bot users
for #880
2024-04-21 08:36:03 -07:00
Ryan Barrett 1686a2ba91
opt in/out prompt: accept yes/no DMs to bot users to enable/disable protocols
for #880
2024-04-21 08:08:12 -07:00
Ryan Barrett 0c37d94191
ids.translate_* noop refactoring: from_proto => from_, to_proto => to 2024-04-20 21:03:06 -07:00
Ryan Barrett 70da21a7f3
Protocol.receive: send accepts for bot user follows 2024-04-20 21:02:14 -07:00
Ryan Barrett 20e061f476
Protocol.receive: extract out maybe_accept_follow method
for #880
2024-04-19 12:53:44 -07:00
Ryan Barrett 3c55d7c145
protocol: extract out enable/disable_protocol methods
for #880
2024-04-19 12:53:44 -07:00
Ryan Barrett 2886ae180d
remove common.ENABLED_PROTOCOLS, use Protocol.DEFAULT_ENABLED_PROTOCOLS instead
also use is_enabled_to in user page template
2024-04-18 16:39:15 -07:00
Ryan Barrett 8bcae4c09d
Protocol.receive: following protocol user enables that protocol
for #880
2024-04-18 16:09:09 -07:00
Ryan Barrett d36885728f
Protocol.receive: blocking protocol user disables that protocol
for #880
2024-04-18 16:03:51 -07:00
Ryan Barrett 39a641e000
remove USER_ALLOWLIST in favor of User.enabled_protocols 2024-04-17 17:02:17 -07:00
Ryan Barrett 259b7d72dd
start on conditional opt in
* add Protocol.DEFAULT_ENABLED_PROTOCOLS
* add User.enabled_protocols
* move common.is_enabled to Protocol.is_enabled_to, include opt out/in
2024-04-17 16:43:10 -07:00
Ryan Barrett 393605bde9
change ATProto.ABBREV to bsky
🤞, for #961
2024-04-17 06:54:16 -07:00
Ryan Barrett 2ec22de09f
abstract redirect.py to be multi-protocol
...mostly. creating the underlying user opportunistically is still Web-only.
2024-04-14 18:26:34 -07:00
Ryan Barrett 5ec2159546
user page: link to bridged Bluesky profile
for #825
2024-04-12 08:46:59 -07:00
Ryan Barrett ea1f3dce49
user page bug fix for 133d640f1d 2024-04-12 07:16:06 -07:00
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