Wykres commitów

354 Commity (ccb7158350147e89911a1e72aea72e77c4139954)

Autor SHA1 Wiadomość Data
Ryan Barrett ccb7158350
Protocol.check_supported: allow DMs both to and from bot accounts
for #1205, #1148, #966, #1024
2024-08-16 14:01:28 -07:00
Ryan Barrett a185b34052
Protocol.receive: switch more as1.is_dm to as1.recipient_if_dm 2024-08-16 12:46:02 -07:00
Ryan Barrett 0ce8eaff1a
Protocol.bot_dm => maybe_bot_dm, populate and check User.sent_dms
for #1205, #1148, #966, #1024
2024-08-15 17:24:25 -07:00
Ryan Barrett 9011fa2cbd
Protocol.for_id: error handling for bad URLs 2024-08-15 14:35:49 -07:00
Ryan Barrett 303ea175cf
Protocol.receive: more undo handling, mark object as deleted
also add undo test

for #1243
2024-08-14 13:07:03 -07:00
Ryan Barrett c086eea9eb
Protocol.targets: only use orig_obj for replies and reposts
...not eg link tags. for #1237, #1257
2024-08-13 17:48:50 -07:00
Ryan Barrett 8d67e79f8f
Protocol.translate_ids: handle multiply valued fields like inReplyTo 2024-08-13 15:51:20 -07:00
Ryan Barrett f0ef0bb12b
noop: fix log message in /convert/ 2024-08-12 21:04:20 -07:00
Ryan Barrett 497136f1fc
cache Protocol.for_handle 2024-08-12 13:39:11 -07:00
Ryan Barrett e21dabe98d
noop: Protocol.targets refactoring, source protocol isn't in to_protocols
for #1248
2024-08-12 13:39:10 -07:00
Ryan Barrett 67567ca589
noop: Protocol.targets refactoring for to_protocols loop 2024-08-12 13:39:10 -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 b0f6b1799b
Protocol.bot_dm: log full text 2024-08-09 12:12:26 -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 5f1a99d6cd
Protocol.translate_ids: support multiple objects 2024-08-05 21:22:41 -07:00
Ryan Barrett 3acde571ad
more minor logging optimizations
for https://github.com/snarfed/bridgy-fed/issues/1149
2024-08-02 10:39:25 -07:00
Ryan Barrett 70dd6d3ceb
minor logging optimizations
for https://github.com/snarfed/bridgy-fed/issues/1149
2024-08-02 08:03:44 -07:00
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