Wykres commitów

961 Commity (main)

Autor SHA1 Wiadomość Data
Ryan Barrett 71cb803840
user page bug fix for direct vs enabledd
need to drop direct!
2024-04-27 09:54:13 -07:00
Ryan Barrett 853b4be142
ATroto.send: for flag activities, send createReport to mod service
for snarfed/granary#596. background:
* https://docs.bsky.app/docs/advanced-guides/moderation#reporting
* https://github.com/bluesky-social/atproto/discussions/2350#discussioncomment-8847613
* https://github.com/snarfed/granary/issues/596
2024-04-26 13:59:04 -07:00
Ryan Barrett c065c712f1
more id/handle translation tweaks for protocol bot users
hopefully fixes Accept actor for responding to bot user follows in AP
2024-04-25 14:29:48 -07:00
Ryan Barrett 1d20befe7e
Protocol.receive: always wrap actor objects in update, not post/create 2024-04-25 13:45:27 -07:00
Ryan Barrett 3d84dc4d36
don't show protocol bot users in their own protocols 2024-04-25 11:21:33 -07:00
Ryan Barrett d6a10b4be0
update profile button: make receive task instead of running it inline 2024-04-24 17:06:25 -07:00
Ryan Barrett 41b2aaa1a8
incoming DMs to protocol bot users: filter out @-mentions
for #880
2024-04-24 16:45:43 -07:00
Ryan Barrett 06bf3bf534
receive: drop activity if protocol doesn't own actor
it's probably from a bridged user, and we only want to handle original activities, not bridged ones.

fixes https://console.cloud.google.com/errors/detail/CM6i4sH4176iaQ;time=P30D?project=bridgy-federated
2024-04-24 15:57:00 -07:00
Ryan Barrett 506de7fd1d
User.get_or_create: if the id is a copy, return the original
...which will be in a different protocol! worried this will break something. hrm.
2024-04-23 17:56:59 -07:00
Ryan Barrett 4efb0d3e35
ATProto: tweak polling: every 5 min, 10 items each call 2024-04-23 16:58:30 -07:00
Ryan Barrett 0238b46e36
add Protocol.HAS_COPIES, use to generate ids.COPIES_PROTOCOLS 2024-04-23 16:52:53 -07:00
Ryan Barrett c86c91b25b
User.enable_protocols bug fix: only call create_for for copy protocols
also add integration test for following protocol bot user from ATProto
2024-04-23 16:38:08 -07:00
Ryan Barrett 9fe715137a
webfinger: check that AP protocol is enabled 2024-04-23 15:31:24 -07:00
Ryan Barrett ce23a72549
make ids.translate_handle support protocol bot users 2024-04-23 15:01:40 -07:00
Ryan Barrett 11eb082190
tighten common.unwrap so it doesn't remove protocol bot user URLs
...like https://bsky.brid.gy/ . this hopefully fixes following bot users in eg AP to enable protocols.
2024-04-23 12:00:39 -07:00
Ryan Barrett 3f1d860bba
AP: add test for following bot user to enable protocol
also relax Web.put check on id to allow internal domains for bot users
2024-04-23 10:17:13 -07:00
Ryan Barrett f52f7060a6
test_protocol.test_for_id_object_missing_source_protocol: mock network fetch 2024-04-23 10:16:06 -07:00
Ryan Barrett 304994e3b7
Protocol.for_id: return Web for protocol bot users 2024-04-23 09:39:30 -07:00
Ryan Barrett d4a56127d9
incoming webmentions: stop converting home pages to update activities
pass Protocol.receive the bare actor object, let it convert to update activity, like with posts etc
2024-04-23 06:50:55 -07:00
Ryan Barrett 115d85909a
abstract "update profile" button across protocols
adds new /[protocol]/[id]/update-profile endpoint
2024-04-22 20:21:56 -07:00
Ryan Barrett 03b0f54cfe
Protocol.receive: wrap bare actor object in update activity 2024-04-22 18:39:27 -07:00
Ryan Barrett 0b00e6eb4b
AP: serve protocol bot users on their own subdomains 2024-04-22 16:07:54 -07:00
Ryan Barrett c87e69d354
bug fix for ids.web_ap_base_domain
...and test it properly instead of mocking out the constant
2024-04-22 15:15:27 -07:00
Ryan Barrett 34692abc60
handle protocol bot users in webfinger, ids.translate_handle, Web.owns_handle
for #880
2024-04-22 14:01:09 -07:00
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 ed78090d2c
expand User.ap_subdomain to allow protocol subdomains like bsky
part of setting up per-protocol bot users for #880
2024-04-22 11:12:03 -07:00
Ryan Barrett e1f9021696
AP instance actor: move AS2 JSON files, start adding per-protocol bot users 2024-04-21 16:35:17 -07:00
Ryan Barrett 18b1a33d22
testutil.setUp() noop tweak for adding Fake classes to common.*_DOMAINS 2024-04-21 16:22:33 -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 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 f02ba80304
switch from gcloud datastore emulator to firestore emulator
...since the datastore emulator evidently doesn't support != query filters: https://github.com/googleapis/python-ndb/issues/962
2024-04-17 11:36:28 -07:00
Ryan Barrett 393605bde9
change ATProto.ABBREV to bsky
🤞, for #961
2024-04-17 06:54:16 -07:00
Ryan Barrett e913ad1f53
ATProto.convert: refetch subject for cid if we don't have it 2024-04-15 07:31:05 -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 5b5ed4173a
fix tests for f840c8b784 2024-04-14 14:57:00 -07:00
Ryan Barrett cf633efecf
update tests for snarfed/granary@75a8f45825 2024-04-12 15:11:57 -07:00
Ryan Barrett 5ec2159546
user page: link to bridged Bluesky profile
for #825
2024-04-12 08:46:59 -07:00
Ryan Barrett 817ef1d5d6
user pages: only hide indirect AP users, not ATProto 2024-04-11 14:24:18 -07:00
Ryan Barrett 561c763fd4
atproto handle resolution: test, comments, minor refactoring
for snarfed/granary@d4bff45637
2024-04-10 16:34:50 -07:00
Ryan Barrett c1acec1a3f
clear did.resolve_* caches in tests
for snarfed/arroba@f95365d7c3
2024-04-10 15:20:28 -07:00