Ryan Barrett
5266974731
Protocol.for_id: make Web own bot actor AP ids, not bot protocol
2024-06-02 08:21:18 -07:00
Ryan Barrett
a2376f8f14
prune more logging messages
2024-06-01 07:17:44 -07:00
Ryan Barrett
7e594e3227
authz: move NO_AUTH_DOMAINS (a.gup.pe) from Protocol.receive to activitypub.inbox
...
for #566
2024-05-30 13:34:14 -07:00
Ryan Barrett
9f33767f33
authz: move LD Sig check from Protocol.receive to activitypub.inbox
...
for #566
2024-05-29 21:17:38 -07:00
Ryan Barrett
8f5d8221a9
add ids.profile_id, use everywhere
...
for #566
2024-05-29 16:18:15 -07:00
Ryan Barrett
bfbae4b280
authz: normalize user ids before comparing, in both receive and Object.get_or_create
...
for #566
2024-05-29 12:29:38 -07:00
Ryan Barrett
d8910d52cd
LIMITED_DOMAINS bug fix, read lines from file separately
2024-05-28 20:40:48 -07:00
Ryan Barrett
ea0f61f446
authz: when comparing domains, handle common subdomains like www
...
for #566
2024-05-28 20:36:18 -07:00
Ryan Barrett
f2a64c8b5c
Object.get_or_create: rename actor => authed_as, add to all calls
...
for #566
2024-05-28 16:07:32 -07:00
Ryan Barrett
820f7fa4f4
authz: add protocol.NO_AUTH_DOMAINS for domains we can't authorize yet
...
...eg a.gup.pe. https://github.com/snarfed/bridgy-fed/issues/566#issuecomment-2130714037
2024-05-28 15:23:22 -07:00
Ryan Barrett
fc14298f0d
authz: expand LD Sigs check to any signature field, regardless of creator
...
for #566
2024-05-28 15:15:23 -07:00
Ryan Barrett
03672679b9
activitypub, protocol: misc noop logging and code style tweaks
2024-05-27 20:38:49 -07:00
Ryan Barrett
6f84a98a5d
Protocol.receive: more authz log message tweaks
...
for #566
2024-05-24 20:00:23 -07:00
Ryan Barrett
4ca02824c9
Protocol.receive: tweak authz logging messages
...
for #566
2024-05-24 19:30:31 -07:00
Ryan Barrett
6ffc4a3c3b
infra: add new router flex service, switch tasks to run on it
...
receive, send, webmention, and poll-feed
2024-05-23 20:40:54 -07:00
Ryan Barrett
aa5ec4cccd
Protocol.maybe_delete_copy: minor tweaks
...
for #783
2024-05-23 11:43:02 -07:00
Ryan Barrett
9de5eb400c
Protocol.targets: don't add ATProto for reposts of/replies to non-bridged posts
2024-05-22 23:28:53 -07:00
Ryan Barrett
15af8b2585
limited domains bug fix: don't count protocol bot user follows
2024-05-22 22:33:57 -07:00
Ryan Barrett
f39392e225
Protocol: when disabling a protocol, also delete that protocol's copy user
...
for #783
2024-05-22 16:33:13 -07:00
Ryan Barrett
45ba0fb69f
Protocol.send_task: handle missing url or protocol param
2024-05-22 14:28:17 -07:00
Ryan Barrett
1778a1145e
Protocol.bot_follow: send in separate task instead of inline
...
fixes #1041
2024-05-22 14:28:17 -07:00
Ryan Barrett
06e2e61b1e
ATProto: switch to granary's logic to populate strongRefs, via DatastoreClient
...
for #1007
2024-05-16 13:11:29 -07:00
Ryan Barrett
e4f9966686
Protocol.receive: second part of making explicit opt in override implicit opt out
...
for #1052 , #974
2024-05-15 11:41:20 -07:00
Ryan Barrett
03c5638bc1
Protocol.receive bug fix: resolve ids before checking for bot user follow, not after
...
for #1017
2024-05-14 17:01:20 -07:00
Ryan Barrett
f6798f2725
abstract "bridged from Bridgy Fed" profile label across protocols
...
for #976
2024-05-14 16:03:42 -07:00
Ryan Barrett
79e5d2be07
bug fix for User.status handling: check for false-ness, not is None
...
we have some users in the datastore with status None, some with False. 😕 fixes #1048
2024-05-12 19:02:07 -07:00
Ryan Barrett
348987f0b4
add Protocol.REQUIRES_OLD_ACCOUNT, enable for ActivityPub
2024-05-11 19:20:33 -07:00
Ryan Barrett
59b9e9c904
add protocol.LIMITED_DOMAINS
2024-05-11 17:39:04 -07:00
Ryan Barrett
de0af66979
basic anti-spam: add new Protocol.REQUIRES_AVATAR/NAME constants
...
...and start returning `blocked` from User.status for them
2024-05-11 16:03:07 -07:00
Ryan Barrett
389e2d9205
Protocol.targets: don't add trailing slash to PDS URL https://atproto.brid.gy
...
fixes #1032
2024-05-08 09:37:47 -07:00
Ryan Barrett
f533479e0b
noop: drop unused flask.g imports
2024-05-07 17:14:59 -07:00
Ryan Barrett
4da00192b0
when someone follows a bot user to opt in, have the bot user follow them back
...
fixes #999 . this makes sure we start receiving posts from AP users immediately, instead of waiting until a Bluesky opted in user follows them.
2024-05-07 10:54:18 -07:00
Ryan Barrett
2fa1ae73eb
when someone follows a bot user, refresh their profile first
...
...so that we're up to date on whether they're opted out or not
fixes #1017
2024-05-06 11:30:33 -07:00
Ryan Barrett
515be28cdd
Protocol.receive: automatically send to ATProto PDS if user has ATProto enabled
...
for #999
2024-05-05 17:21:24 -07:00
Ryan Barrett
2bf526ab7c
refactor validating handles in ATProto and elsewhere
...
for https://github.com/snarfed/bridgy-fed/issues/982
2024-05-03 15:18:16 -07:00
Ryan Barrett
91638ef8bb
bring back self replies check, only send self replies to followers
...
revises 073ce475e5
, #981 , #950 , #949
2024-05-02 13:39:10 -07:00
Ryan Barrett
0cfd188fd4
Protocol.targets fix for bug introduced in 073ce475e5
...
fixes https://console.cloud.google.com/errors/detail/CIzN5p2u2IPGpQE;time=P30D?project=bridgy-federated
2024-05-01 18:53:09 -07:00
Ryan Barrett
073ce475e5
Protocol.receive: bridge replies to followers where in-reply-to already is
...
...ie if it's on the follower's protocol, either native or bridged.
for #981 , #950 , #949
not confident in this, despite the tests. worried it will either over- or under-deliver. guess we'll see.
2024-05-01 17:45:48 -07:00
Ryan Barrett
ee9bb53745
ATProto: drop trailing slash from PDS URL
...
the ATProto DID spec says it shouldn't be there: https://atproto.com/specs/did#did-documents
> The serviceEndpoint field must contain an HTTPS URL of server. It should contain only the URI scheme (http or https), hostname, and optional port number, not any "userinfo", path prefix, or other components.
thanks for the nudge @mackuba!
2024-05-01 17:45:48 -07:00
Ryan Barrett
9617d8ab71
move Protocol.is_enabled to User.is_enabled
2024-04-27 20:34:37 -07:00
Ryan Barrett
cbe4b59206
convert Protocol.is_enabled_to to an instance method
...
next commit will move it to User
2024-04-27 20:27:33 -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
dd1d53c28b
allow receive tasks for protocol bot domains, for update profile button
2024-04-25 12:39:04 -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
b543fdb1d5
switch to Gmail SMTP, other minor tweaks
2024-04-24 14:26:20 -07:00
Ryan Barrett
0238b46e36
add Protocol.HAS_COPIES, use to generate ids.COPIES_PROTOCOLS
2024-04-23 16:52:53 -07:00