Wykres commitów

1265 Commity (1ecad1fcc8e310ded6f36c6f2907035d2a6678ca)

Autor SHA1 Wiadomość Data
Ryan Barrett 497136f1fc
cache Protocol.for_handle 2024-08-12 13:39:11 -07:00
Ryan Barrett 5d5a983564
Protocol.bot_follow: handle when user has no profile obj
fixes https://console.cloud.google.com/errors/detail/CIvu-KTludO5LA;time=P1D;locations=global?project=bridgy-federated
2024-08-11 08:51:08 -07:00
Ryan Barrett eebea504b6
Protocol.bot_dm: handle when recipient has no profile obj
fixes https://console.cloud.google.com/errors/detail/CIGR6crBlMKMBg;locations=global;time=P30D?project=bridgy-federated
2024-08-11 08:41:44 -07:00
Ryan Barrett a91c8087fb
ATProto.send: gracefully handle updates/deletes that don't match original AT URI
for eg #1252
2024-08-11 07:42:10 -07:00
Ryan Barrett 21fb033ac7
Web.verify: if redirect destination is right, ignore HTTP status code
we now return 404 if the user doesn't have `has_redirects` set yet, so we need to break that loop 😀

fixes #1247
2024-08-09 12:12:27 -07:00
Ryan Barrett 07b8a3de1d
User.enable_protocol: fill in real welcome DM message
for #1024, #966, etc
2024-08-08 22:21:40 -07:00
Ryan Barrett 925771562f
add Protocol.SUPPORTS_DMS
for #1024, #966, etc
2024-08-08 20:41:57 -07:00
Ryan Barrett cd0a4bce9e
AP: add outbound DM support
for #1024, #966, etc
2024-08-08 20:35:56 -07:00
Ryan Barrett 23aa24eb4f
User.enable_protocol: send welcome DM
via new Protocol.bot_dm method

for #1024, #966, etc
2024-08-08 20:17:06 -07:00
Ryan Barrett 37c781a2df
ATProto.send: handle DMs, translate and send as chat messages
for #1024, #966, etc
2024-08-08 20:17:06 -07:00
Ryan Barrett 356903c3e9
test_pages: test www special case domains
for #1244
2024-08-08 20:16:17 -07:00
Ryan Barrett 848313dfd4
ATProto.send_chat: handle 400 from getConvoForMembers, sendMessage
for #1024, #966, etc
2024-08-07 13:09:37 -07:00
Ryan Barrett c8d6ba510f
add ATProto.send_chat
for #1024, #966, #758, etc
2024-08-07 13:09:37 -07:00
Ryan Barrett a49fa0d5e0
ids.translate_handle: test AP => ATProto error for leading/trailing dash 2024-08-07 13:09:37 -07:00
Ryan Barrett 479acea657
move Web.verify from /web-site handler to Web.get_or_create
for #1232
2024-08-06 11:07:13 -07:00
Ryan Barrett 5f1a99d6cd
Protocol.translate_ids: support multiple objects 2024-08-05 21:22:41 -07:00
Ryan Barrett 124718ecc7
ATProto.create_report bug fix: include JWT 2024-08-05 19:38:52 -07:00
Ryan Barrett 978f1f7019
noop: activitypub: existing server actor test, ignore 'ap' protocol label 2024-08-05 19:20:57 -07:00
Ryan Barrett 29482d1c66
AP: automatically bridge server/instance actors
for #1184
2024-08-05 13:34:55 -07:00
Ryan Barrett 6a0a0fbdc6
webfinger: don't serve domain@domain for web users without redirects
for #911, #1025
2024-08-05 13:34:54 -07:00
Ryan Barrett 5679d696a4
cache models.get_originals in memory
for #1149
2024-08-01 16:20:13 -07:00
Ryan Barrett 001bade672
test noop: switch test_cache_policy to use ndb keys, not datastore API keys
https://github.com/googleapis/python-ndb/issues/987
2024-08-01 12:51:50 -07:00
Ryan Barrett e9dc38c75c
actually turn on ndb global cache with global_cache_policy
🤦
2024-08-01 12:42:13 -07:00
Ryan Barrett 4097fe71fb
use ndb in-memory context cache for DID doc Objects
for #1149
2024-08-01 12:09:37 -07:00
Ryan Barrett d769d03a4f
Protocol.check_supported: block DMs (for now) 2024-07-31 23:12:47 -07:00
Ryan Barrett 22570881b7
fix tests for 3529216 2024-07-31 09:23:12 -07:00
Ryan Barrett 3529216e5d
disable caching get_originals (88cbe3b) until bugs are fixed
for #1149
2024-07-31 09:14:31 -07:00
Ryan Barrett 88cbe3b7b4
cache models.get_originals in memcache with new memcache_memoize decorator
for #1149
2024-07-30 14:50:33 -07:00
Ryan Barrett 33e0d0b14a
common.memcache_key: encode Unicode chars as UTF-8 2024-07-30 14:49:50 -07:00
Ryan Barrett 773a6055fc
Fake: support Flag 2024-07-28 10:15:37 -07:00
Ryan Barrett caa8dd2341
Protocol.delete_user_copy: use better id for delete activity
that's more likely to pass Protocol.owns_id for all protocols. (this was failing ATProto)
2024-07-27 16:40:56 -07:00
Ryan Barrett 5454e19a23
ATProto.handle_to_id: skip opted out/blocked users
for #1215
2024-07-27 08:55:53 -07:00
Ryan Barrett d14e19ce16
ATProto._convert: when converting images to blobs, skip images that we can't fetch
fixes errors registering web sites when fetching their favicons etc fails
2024-07-24 16:08:55 -07:00
Ryan Barrett 37e70104e5
drop unused protocol.seen_ids, we switched it to memcache a bit ago 2024-07-24 14:58:25 -07:00
Ryan Barrett 00626f5f42
ATProto.create_for: handle existing DNS record
delete and add new one. for #1072
2024-07-24 13:41:21 -07:00
Ryan Barrett 4c21eb2f74
ATProto.create_for: extract out set_dns_did method
prep for #1072
2024-07-24 08:17:06 -07:00
Ryan Barrett da251d9ec1
ATProto: link to user page in profile footer links for web users 2024-07-23 22:11:42 -07:00
Ryan Barrett f34d1b43a3
User.status: make opt in override #nobot but not #nobridge
for #1204, re #974
2024-07-23 13:54:24 -07:00
Ryan Barrett 4e958f68e2
Web feed polling: don't use user profile images as post metaformats images
for #1191
2024-07-23 13:05:27 -07:00
Ryan Barrett 56cb6378d4
test_web: fix tests to include requests.get responses for fetching posts for images
tests weren't broken, technically, but BeautifulSoup was complaining. for 45df0ea
2024-07-23 12:13:19 -07:00
Ryan Barrett b90cdefacf
Web.fetch bug fix: only default metaformats on for home pages
fixes 45df0ea
2024-07-23 11:54:56 -07:00
Ryan Barrett 755997e5f7
atproto_firehose: don't load DIDs for tombstoned AtpRepos
for #1193
2024-07-22 22:24:13 -07:00
Ryan Barrett 5bcb230d39
drop /bridge-user 2024-07-22 20:45:22 -07:00
Ryan Barrett 45df0ea410
Web feed polling: if an entry doesn't have an image, fetch it from metaformats 2024-07-22 18:11:49 -07:00
Ryan Barrett 746c57a931
/convert: handle Bluesky objects that we can't (yet) convert to AS1
fixes https://console.cloud.google.com/errors/detail/CICesouJo-PV7AE;time=P30D?project=bridgy-federated
2024-07-18 09:56:54 -07:00
Ryan Barrett 37076841d4
update test for snarfed/granary@e93dbd241f 2024-07-17 09:57:04 -07:00
Ryan Barrett 075c33cade
memcache: encode spaces in keys as %20
fixes https://console.cloud.google.com/errors/detail/CNPzqYzWg4_TyQE;time=P7D?project=bridgy-federated
2024-07-16 13:48:52 -07:00
Ryan Barrett 0a22643cef
User.get_or_create: merge enabled_protocols
for #1034
2024-07-15 20:09:20 -07:00
Ryan Barrett ee62334a93
turn on web <=> Bluesky!
for #1034
2024-07-15 19:40:10 -07:00
Ryan Barrett 1a23d8eba3
Protocol.targets: when adding in-reply-to, check from user's enabled protocols
fixes https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;time=P7D?project=bridgy-federated
2024-07-14 13:42:38 -07:00
Ryan Barrett 2a83cbb0d8
Protocol.targets: bug fix for self replies
this bug snuck in because of our special case handling of Fake and OtherFake in Protocol.targets. ugh. need to get rid of that, and elsewhere, eg ids.*.

fixes #1179
2024-07-13 12:58:06 -07:00
Ryan Barrett 1f73058ef6
Protocol.receive, ActivityPub.inbox: consolidate memcache key for seen activities 2024-07-12 08:21:30 -07:00
Ryan Barrett 06f3694c9d
Protocol.receive: return HTTP 299 for deterministic errors to prevent retries
for https://github.com/snarfed/bridgy-fed/issues/1063
2024-07-10 21:04:04 -07:00
Ryan Barrett 89e2372922
Protocol.receive: detect and prevent duplicate calls for the same object
for https://github.com/snarfed/bridgy-fed/issues/1063, should fix it. coming up with the test for this was fun!
2024-07-10 20:59:03 -07:00
Ryan Barrett 714c317dd4
Protocol.targets: only deliver reposts, replies etc if the original post was bridged
for #1166, #1151, maybe others. #1151 is the big motivation here: that we're currently generating and sending Bluesky a ton of reposts with blank subject cid/URL, which afaict is the main reason bridging is getting stuck for some accounts and the relay is constantly calling `getRepo`. I'm hoping this will reduce or eliminate that.

this isn't a big behavior change, but it is a kind of big change to routing logic. it's tested pretty well, but I still expect something to break. we'll see.
2024-07-09 17:29:02 -07:00
Ryan Barrett 893176fb56
Protocol.targets bug fix for undo share
fixes https://console.cloud.google.com/errors/detail/CJK54eaoneesMg;time=P30D?project=bridgy-federated
2024-07-09 07:41:24 -07:00
Ryan Barrett 23e1a90c88
Protocol.targets bug fix for 71ebc99: don't add object to feed if internal call
for https://console.cloud.google.com/errors/detail/CMzg3eXbyOi1ygE;time=P1D?project=bridgy-federated
2024-07-09 07:41:24 -07:00
Ryan Barrett 4b0146c590
Protocol.targets: skip copy protocol if inReplyTo or repost original wasn't copied there
once more with feeling!

for #1166
2024-07-09 07:41:24 -07:00
Ryan Barrett 0dce5c108d
integration test for ATProto => AP undo block
for #1162
2024-07-09 07:41:23 -07:00
Ryan Barrett 71ebc99a9f
Protocol.targets: give undo same targets as the activity it's undoing
for #1162
2024-07-07 17:21:37 -07:00
Ryan Barrett 08b41b0ede
test Protocol.targets for undo block, special case in activitypub.postprocess_as2
for #1162
2024-07-06 19:36:11 -07:00
Ryan Barrett 13da9becf6
atproto_firehose.handle: map delete of activity to undo, not delete
for #1162
2024-07-06 15:26:20 -07:00
Ryan Barrett df75e97880
atproto_firehose.handle bug fix: deletes don't have records
for #1162
2024-07-06 14:47:14 -07:00
Ryan Barrett e5a6ebf228
drop Protocol.HAS_FOLLOW_ACCEPTS in favor of SUPPORTED_AS1_TYPES 2024-07-05 23:12:35 -07:00
Ryan Barrett 17ced85c6f
Protocol.receive: support blocks
for #1162
2024-07-05 22:46:52 -07:00
Ryan Barrett 2d1cb80e80
Protocol.check_supported bug fix: handle undo of activity 2024-07-05 12:26:59 -07:00
Ryan Barrett 98d21ae0d9
common.report_error/exception bug fix, handle running outside request context 2024-07-05 12:15:06 -07:00
Ryan Barrett 3cde69e61c
test_atproto noop, stop returning objects from a couple tests 2024-07-04 22:32:28 -07:00
Ryan Barrett b606924d63
refactor SUPPORTED_AS1_TYPES usage into new Protocol.check_supported method 2024-07-04 21:11:38 -07:00
Ryan Barrett 850d681f83
add Protocol.SUPPORTED_AS1_TYPES 2024-07-04 16:58:06 -07:00
Ryan Barrett 036ccb8d16
fix a few errant AS1 'create' verbs to 'post' 2024-06-30 21:29:06 -07:00
Ryan Barrett 22d6cef9b1
ATProto: translate undo (of eg likes, reposts) to delete
for #1127
2024-06-29 21:57:22 -07:00
Ryan Barrett 0a31558dc8
fix tests for b87b4aa 2024-06-27 13:23:08 -07:00
Ryan Barrett b87b4aa5f8
Protocol.receive: stop special casing replies, bridge them everywhere more often
For https://github.com/snarfed/bridgy-fed/issues/1047#issuecomment-2195298955 . This is a bit of a YOLO, I'm a bit apprehensive about it: I'm jettisoning much of the reply-specific logic in Protocol.receive and instead delivering replies across protocols more often. Still only delivering self-replies to followers though, not other replies.

🤞🤞🤞
2024-06-27 13:20:07 -07:00
Ryan Barrett 25199f8c9a
activitypub.inbox: only mark id seen in memcache after we've enqueued the receive task
for https://github.com/snarfed/bridgy-fed/issues/1047#issuecomment-2195287066
2024-06-27 13:20:07 -07:00
Ryan Barrett 8457f2a048
drop unused Object.object_ids computed property 2024-06-27 13:20:07 -07:00
Ryan Barrett f7a495a417
ids: drop _NON_WEB_SUBDOMAIN_SITES, look up (and cache) individual Web users instead 2024-06-26 16:16:23 -07:00
Ryan Barrett 45b48c6efb
Protocol.translate_ids: bug fix for ac2df74 for attachments with blocklisted url
fixes https://console.cloud.google.com/errors/CO25nvfq2Ojq0gE?project=bridgy-federated&time=P30D& , https://console.cloud.google.com/errors/CO2h-5yh276BQw?project=bridgy-federated&time=P30D& , etc

for #1154
2024-06-26 11:07:18 -07:00
Ryan Barrett ac2df747a6
Protocol.translate_ids: fix user-visible quote post URL
broken by a735396, for #1154 and #461
2024-06-25 21:10:33 -07:00
Ryan Barrett 350e234b9c
Protocol.receive: bridge native replies if the in-reply-to was bridged
for https://github.com/snarfed/bridgy-fed/issues/1047
2024-06-25 13:37:14 -07:00
Ryan Barrett a735396864
Protocol.translate_ids: add attachment.url
for https://github.com/snarfed/bridgy-fed/issues/461 , fixes AP => ATProto quote post of AP original post that was bridged
2024-06-25 12:27:43 -07:00
Ryan Barrett 48dd8b1531
ATProto.send bug fix for updating profiles 2024-06-24 18:17:58 -07:00
Ryan Barrett fc0cc1118a
activitypub.inbox: short circuit on activity or actor id on opted out domain 2024-06-23 09:20:22 -07:00
Ryan Barrett 16724974b7
User.get_or_create bug fix: check status when creating a new user 2024-06-23 09:08:13 -07:00
Ryan Barrett fd74d98a6e
fix tests for 6eda331946 2024-06-23 08:38:00 -07:00
Ryan Barrett 6eda331946
user page UI: apply status to query by handle as well as get_by_id 2024-06-23 08:03:22 -07:00
Ryan Barrett 6e7667c266
ATProto.send and nearby: don't assume that ids are already translated
for refactoring opt_out.py to be more generic
2024-06-22 16:41:23 -07:00
Ryan Barrett 417e3fdb20
webfinger: return 404 on invalid web domains, not 400
for #1115
2024-06-21 09:37:22 -07:00
Ryan Barrett 84949f265b
Web.owns_id: check TLD against brevity's allowlist
fixes #1115
2024-06-20 23:36:01 -07:00
Ryan Barrett bf657d3409
ActivityPub.inbox: return 400 on invalid activity id
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P7D?project=bridgy-federated
2024-06-20 14:32:37 -07:00
Ryan Barrett 81bb033e68
Protocol.receive: on bot user follow, refresh profile id, not just actor id
fixes https://console.cloud.google.com/errors/detail/CIvu-KTludO5LA;time=P7D?project=bridgy-federated
2024-06-20 14:19:17 -07:00
Ryan Barrett 7ac501cfff
Web.fetch, get_or_create: only load or create protocol bot users that already exist
fixes https://console.cloud.google.com/errors/detail/CM-n8tK-5LXhIw;time=P7D?project=bridgy-federated
2024-06-20 13:41:39 -07:00
Ryan Barrett e5d800cf53
ATProto: handle getRecord errors
hopefully fixes https://console.cloud.google.com/errors/detail/CMCs_JjSnpWBtAE;time=P30D?project=bridgy-federated
2024-06-20 11:20:24 -07:00
Ryan Barrett 0ec722f4a0
ATProto.send: handle update and delete when record doesn't exist
hopefully fixes https://console.cloud.google.com/errors/detail/CODcisqz56SZugE;time=P7D?project=bridgy-federated , https://console.cloud.google.com/errors/detail/CN_mkuKjg-rf_wE;time=P7D?project=bridgy-federated
2024-06-19 21:12:41 -07:00
Ryan Barrett 3d3ac1e9f4
ATProto.send: implement stop-following
hopefullly fixes https://console.cloud.google.com/errors/detail/CPvA_dLO4r_hIA;time=P7D?project=bridgy-federated
2024-06-19 19:59:55 -07:00
Ryan Barrett 94676ac694
ATProto.send: short circuit if we couldn't convert the object
for #1064, hopefully fixes https://console.cloud.google.com/errors/detail/COjSuYPS0qLvmAE;time=P7D?project=bridgy-federated
2024-06-19 16:23:51 -07:00
Ryan Barrett 960d564614
ATProto DatastoreClient: add support for records in local repos
hopefully fixes https://console.cloud.google.com/errors/detail/CMCs_JjSnpWBtAE;time=P7D?project=bridgy-federated
2024-06-19 16:08:07 -07:00
Ryan Barrett 32c69876fb
AP: bug fix for converting Link attachments to HTML links in content
for 980a786, #958
2024-06-19 13:54:06 -07:00
Ryan Barrett 980a786c6b
AP: convert Link attachments to HTML links in content
...since some fediverse platforms (notably Mastodon) will render them as blank "Preview not available" embeds, and support on other platforms is unreliable. Most reliably generate preview embeds for HTML links in content though.

fixes #958
2024-06-19 13:29:20 -07:00
Ryan Barrett 349f4ba544
user page UI: ellipsize user-visible handles
fixes #994
2024-06-19 11:05:10 -07:00