Wykres commitów

256 Commity (main)

Autor SHA1 Wiadomość Data
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
Ryan Barrett 304994e3b7
Protocol.for_id: return Web for protocol bot users 2024-04-23 09:39:30 -07:00
Ryan Barrett d4a56127d9
incoming webmentions: stop converting home pages to update activities
pass Protocol.receive the bare actor object, let it convert to update activity, like with posts etc
2024-04-23 06:50:55 -07:00
Ryan Barrett 03b0f54cfe
Protocol.receive: wrap bare actor object in update activity 2024-04-22 18:39:27 -07:00
Ryan Barrett b9551c4de7
adjust Web.owns_id to say it owns protocol bot user domains but not their pages
eg bsky.brid.gy True, https://bsky.brid.gy/ True, https://bsky.brid.gy/foo False.

also move our internal synthetic UI-initiated follow ids from https://fed.brid.gy/web/... to under the user's own domain. hopefully this won't break anything 🤞
2024-04-22 11:58:01 -07:00
Ryan Barrett 10023d17fd
Protocol.enable_protocol: create copy user if necessary 2024-04-21 12:18:12 -07:00
Ryan Barrett 6b597c90c3
User.get_or_create: abstract propagate and create_for across protocols 2024-04-21 11:40:13 -07:00
Ryan Barrett f357ea1698
ActivityPub: accept non-public DMs to protocol bot users
for #880
2024-04-21 08:36:03 -07:00
Ryan Barrett 1686a2ba91
opt in/out prompt: accept yes/no DMs to bot users to enable/disable protocols
for #880
2024-04-21 08:08:12 -07:00
Ryan Barrett 0c37d94191
ids.translate_* noop refactoring: from_proto => from_, to_proto => to 2024-04-20 21:03:06 -07:00
Ryan Barrett 70da21a7f3
Protocol.receive: send accepts for bot user follows 2024-04-20 21:02:14 -07:00
Ryan Barrett 20e061f476
Protocol.receive: extract out maybe_accept_follow method
for #880
2024-04-19 12:53:44 -07:00
Ryan Barrett 3c55d7c145
protocol: extract out enable/disable_protocol methods
for #880
2024-04-19 12:53:44 -07:00
Ryan Barrett 2886ae180d
remove common.ENABLED_PROTOCOLS, use Protocol.DEFAULT_ENABLED_PROTOCOLS instead
also use is_enabled_to in user page template
2024-04-18 16:39:15 -07:00
Ryan Barrett 8bcae4c09d
Protocol.receive: following protocol user enables that protocol
for #880
2024-04-18 16:09:09 -07:00
Ryan Barrett d36885728f
Protocol.receive: blocking protocol user disables that protocol
for #880
2024-04-18 16:03:51 -07:00