Ryan Barrett
5679d696a4
cache models.get_originals in memory
...
for #1149
2024-08-01 16:20:13 -07:00
Ryan Barrett
d769d03a4f
Protocol.check_supported: block DMs (for now)
2024-07-31 23:12:47 -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
05ad4d8ccd
Protocol.receive: set expiration on memcache activity id "done" entries
2024-07-27 08:55:53 -07:00
Ryan Barrett
8bdcd1ff1b
protocol: minor log tweak
2024-07-25 18:18:53 -07:00
Ryan Barrett
96846c2f2a
protocol, activitypub: drop some verbose logging from INFO down to DEBUG
2024-07-25 14:44:15 -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
100a208e5e
add allow_opt_out to Protocol.key_for, User.get_or_create, Protocol.receive internal
...
for #1204
2024-07-23 19:26:30 -07:00
Ryan Barrett
0c797b8b49
Protocol.receive: minor bug fix for logging message
2024-07-19 21:34:37 -07:00
Ryan Barrett
f5bcb98d5e
log message tweaks for receive, send
2024-07-18 17:05:21 -07:00
Ryan Barrett
b3b825f66c
tweak receive activity logging msg
2024-07-18 15:23:40 -07:00
Ryan Barrett
f1713e68d9
drop a bunch of log messages from info to debug
...
...and other logging tweaks
for https://github.com/snarfed/bridgy-fed/issues/1060
2024-07-18 14:15:12 -07:00
Ryan Barrett
1280982e97
load LIMITED_DOMAINS from env var if available
...
for #1089
2024-07-16 14:28:45 -07:00
Ryan Barrett
bf11eb8649
Protocol.send_task: retry writing results to Object more aggressively
...
this has high contention during inbox delivery.
for https://console.cloud.google.com/errors/detail/CJm_4sDv9O-iKg;time=P7D?project=bridgy-federated
2024-07-16 13:58:43 -07:00
Ryan Barrett
4ff28ca377
minor noop refactorings
2024-07-15 20:09:33 -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
7b0151b0cf
memcache: truncate keys at 250 chars
...
max memcache key len:
https://github.com/memcached/memcached/wiki/Commands#standard-protocol
https://pymemcache.readthedocs.io/en/latest/apidoc/pymemcache.client.base.html
fixes https://console.cloud.google.com/errors/detail/CNPzqYzWg4_TyQE;time=P30D?project=bridgy-federated
2024-07-12 07:50:54 -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
6879aa93b0
noop: Protocol.targets: revise a misleading log message
2024-07-09 19:17:04 -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
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
2189652a1d
Protocol.maybe_accept_follow: switch send from inline to task
2024-07-05 23:20:34 -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
fa1ae889d8
Protocol.check_supported: don't report error, just log
2024-07-04 22:13: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
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
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
308501236e
Protocol.receive bug fix for 350e234b9c
...
for #1047
2024-06-25 15:57:55 -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
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
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
a59eb8c466
Protocol.maybe_accept_follow: pass authed_as to Object.get_or_create
...
fixes https://console.cloud.google.com/errors/detail/CM7b86Se9r_qfQ;time=P7D?project=bridgy-federated
2024-06-20 13:08:35 -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
679e89c175
Protocol.translate_ids: add AS1 attachments[].id
...
needed for quote posts, #461
2024-06-17 16:36:44 -07:00
Ryan Barrett
da5d434595
bug fix for deleting bridged fediverse actors: translate object as actor id
...
...not as object id. for #783 , 81319a7628
2024-06-14 12:54:55 -07:00
Ryan Barrett
81319a7628
when a Bluesky user blocks the ap.brid.gy bot, delete their bridged fediverse profile
...
for #783
2024-06-13 21:47:19 -07:00
Ryan Barrett
fdca3b6d55
Protocol.receive: don't attempt to deliver to followers on non-enabled protocols
...
mostly just handles this more gracefully. these deliveries were failing anyway, just not cleanly. fixes eg https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;time=P30D?project=bridgy-federated , probably others too
2024-06-13 12:02:54 -07:00