Ryan Barrett
788b37279a
pass Object data in receive task HTTP payload instead of through datastore
...
trying to cut down datastore load and costs. this switches receive tasks from storing and fetching Objects from the datastore to passing their properties - notably as2, our_as1, bsky, etc - in the HTTP request body, as serialized JSON inside form-encoded params.
for #1354 , #1149
2024-10-01 21:44:12 -07:00
Ryan Barrett
c843c98c3e
Protocol.handle_follow: allow following opted out/blocked users
...
we still won't bridge or otherwise handle those users' activities though
fixes https://console.cloud.google.com/errors/detail/CM7b86Se9r_qfQ;time=PT1H;locations=global?project=bridgy-federated
2024-09-24 06:59:49 -07:00
Ryan Barrett
fdb92dcff9
Protocol.receive: catch HTTP/connection errors, return 304
...
fixes:
https://console.cloud.google.com/errors/detail/CIb-6vLIioHJaw;time=P1D;locations=global?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CPnSx-yemJ-hlAE;time=P1D;locations=global?project=bridgy-federated
https://console.cloud.google.com/errors/detail/CN278MyjhZbtOQ;time=P1D;locations=global?project=bridgy-federated
etc
2024-09-19 10:44:34 -07:00
Ryan Barrett
724978a25f
noop: receive, send tasks: tweak delay log
...
for #1308
2024-09-18 20:46:21 -07:00
Ryan Barrett
5884be8300
send task: log delay from when Object was created
...
for #1308 , 85b9643cda
2024-09-17 17:51:20 -07:00
Ryan Barrett
85b9643cda
receive task: log delay from when Object was created
...
for #1308
2024-09-17 16:50:13 -07:00
Ryan Barrett
4df76d0db7
when we get a delete, or a web user opts out, delete their copies in other protocols
...
for #1304
2024-09-16 18:27:04 -07:00
Ryan Barrett
9c0c837fb7
Protocol.receive: move deleting actors to after deliver
...
so that User.enabled_protocols is still populated during deliver
for #1304
2024-09-13 22:17:47 -07:00
Ryan Barrett
ffb4459545
revise AP Delete => Bluesky tombstone flow, add integration test
...
for #1304
2024-09-13 21:43:38 -07:00
Ryan Barrett
f3522e42bc
Protocol.translate_ids: translate to, cc, bto, bcc
...
for #12
2024-09-13 14:50:43 -07:00
Ryan Barrett
e50da55da9
Protocol.send: follow User.use_instead
...
hopefully helps with https://console.cloud.google.com/errors/detail/CMHloZaRmPXQZQ;locations=global;time=P30D?project=bridgy-federated
2024-09-12 13:05:41 -07:00
Ryan Barrett
36a9f94cb8
add fallback kwargs to User.user_link, Protocol.bridged_web_url_for
...
for #966
2024-09-10 16:44:18 -07:00
Ryan Barrett
26d9a20db3
Protocol.receive: don't fetch actor for deletes or undos
2024-09-03 18:06:45 -07:00
Ryan Barrett
c2fc854d01
noop: tweak log message in Protocol.send_task
2024-09-03 12:44:13 -07:00
Ryan Barrett
a896b5c869
Protocol.check_supported: allow DMs to/from protocol bot user copy ids
...
for #966
2024-08-29 12:56:07 -07:00
Ryan Barrett
e776ff944b
move not-public check from activitypub.inbox to Protocol.receive
2024-08-19 12:02:52 -07:00
Ryan Barrett
ecab888a02
move incoming DM handling from Protocol.receive to dms.receive
2024-08-18 08:29:05 -07:00
Ryan Barrett
be2b36cf8a
start new dms module, move Protocol.maybe_bot_dm into it
2024-08-17 22:53:14 -07:00
Ryan Barrett
244dbc6862
DMs: drop welcome special case, don't allow multiple welcome DMs
2024-08-17 16:51:08 -07:00
Ryan Barrett
d7642e0392
AP DMs: wrap in post activity, add mention tag, improve DM vs public handling
2024-08-17 16:48:55 -07:00
Ryan Barrett
14a63b8106
Protocol.maybe_bot_dm bug fix: send a Create activity, not a bare Note
...
for #1205 etc
2024-08-17 14:35:57 -07:00
Ryan Barrett
38b646ef7d
bug fix for DM prompt when unbridged user replies to bridged user
...
use the right reply URL and in-reply-to author name and URL
for #1205
2024-08-17 12:22:05 -07:00
Ryan Barrett
98098aeabb
when an unbridged user replies to a bridged user, DM them a prompt
...
one time only, per user per protocol!
for #1205
2024-08-16 14:03:44 -07:00
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