Wykres commitów

43 Commity (main)

Autor SHA1 Wiadomość Data
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 b8e67829e3
ids.translate_handle: validate ATProto handles
https://atproto.com/specs/handle#handle-identifier-syntax

for https://github.com/snarfed/bridgy-fed/issues/982
2024-05-03 14:51:26 -07:00
Ryan Barrett 4b95d49ccc
ids.translate_handle: convert _ and ~ chars to - for Bluesky
hopefully fixes #982
2024-05-02 15:41:41 -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 0238b46e36
add Protocol.HAS_COPIES, use to generate ids.COPIES_PROTOCOLS 2024-04-23 16:52:53 -07:00
Ryan Barrett c86c91b25b
User.enable_protocols bug fix: only call create_for for copy protocols
also add integration test for following protocol bot user from ATProto
2024-04-23 16:38:08 -07:00
Ryan Barrett ce23a72549
make ids.translate_handle support protocol bot users 2024-04-23 15:01:40 -07:00
Ryan Barrett c87e69d354
bug fix for ids.web_ap_base_domain
...and test it properly instead of mocking out the constant
2024-04-22 15:15:27 -07:00
Ryan Barrett 34692abc60
handle protocol bot users in webfinger, ids.translate_handle, Web.owns_handle
for #880
2024-04-22 14:01:09 -07:00
Ryan Barrett ed78090d2c
expand User.ap_subdomain to allow protocol subdomains like bsky
part of setting up per-protocol bot users for #880
2024-04-22 11:12:03 -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 0c37d94191
ids.translate_* noop refactoring: from_proto => from_, to_proto => to 2024-04-20 21:03:06 -07:00
Ryan Barrett 259b7d72dd
start on conditional opt in
* add Protocol.DEFAULT_ENABLED_PROTOCOLS
* add User.enabled_protocols
* move common.is_enabled to Protocol.is_enabled_to, include opt out/in
2024-04-17 16:43:10 -07:00
Ryan Barrett 12a3bf0862
noop: add messages to asserts in ids, atproto 2024-04-15 16:44:33 -07:00
Ryan Barrett a45917cec8
ids.translate_object_id: normalize bsky.app profile URLs to DIDs 2024-04-09 10:04:16 -07:00
Ryan Barrett e3f2c2e0bc
ids.translate_user_id: normalize bsky.app profile URLs to DIDs 2024-04-09 09:48:16 -07:00
Ryan Barrett 675e39809e
web UI: tweak user links in user page header 2024-02-11 14:39:09 -08:00
Ryan Barrett ee213531c5
add scripts/opt_out.py
for #783
2024-01-27 14:10:51 -08:00
Ryan Barrett 199fb65dd6
ids.translate_object_id: handle Web.ap_subdomain
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:20:04 -08:00
Ryan Barrett 2fafd83344
ids.translate_user_id: handle Web.ap_subdomain
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:04:01 -08:00
Ryan Barrett c816be48ba
ids.translate_handle: add enhanced kwarg
for #551
2023-11-29 16:41:09 -08:00
Ryan Barrett 4d095fa3d9
misc cleanup
* remove obsolete TODOs, commented out code
* remove obsolete circular imports of per-protocol modules
* minimize Object put in Protocol.load
* remove duplicated Protocol.load tests in test_activitypub
* re-enable rest of ActivityPubUtilsTest.test_postprocess_as2_idempotent
* drop default cls=Web in TestCase.make_user
2023-11-15 14:23:08 -08:00
Ryan Barrett bca034c4f8
ids: use subdomain-wrapped URLs to convert ATProto to Web/AP 2023-11-06 20:17:23 -08:00
Ryan Barrett 98bb29b333
drop Object.proxy_url, switch callers to ids.translate_object_id 2023-11-06 12:18:11 -08:00
Ryan Barrett cada99e407
ids.translate_user_id: follow use_instead 2023-11-03 14:53:19 -07:00
Ryan Barrett 6410d0ef1a
ids.translate_object_id: special case Web => AP
also preserve local hosts
2023-11-03 11:37:36 -07:00
Ryan Barrett 37d8b5d4fc
ids.translate_user_id: for Web, normalize home page URLs to domains 2023-11-03 11:00:34 -07:00
Ryan Barrett 0725b72812
ids.translate_user_id: special case Web => AP to fed.brid.gy/domain 2023-11-03 06:53:33 -07:00
Ryan Barrett def5638a64
Protocol.translate: distinguish between object and user ids 2023-11-02 13:08:24 -07:00
Ryan Barrett 9aff3122c0
noop: rename get_for_copy[ies] => get_for_original[s] 2023-11-02 13:08:23 -07:00
Ryan Barrett c280a3f213
switch Protocol.translate_ids from using subdomain_wrap to translate_object_id 2023-10-26 17:18:01 -07:00
Ryan Barrett c5959e00f4
add ids.translate_object_id 2023-10-26 16:20:30 -07:00
Ryan Barrett cfbfba654e
move User.get_for_copy/ies to module level, add Object results 2023-10-26 16:00:03 -07:00
Ryan Barrett 5843235fd1
rename ids.convert_id => translate_user_id, convert_handle => translate_handle 2023-10-26 13:53:31 -07:00
Ryan Barrett 5a07e154ef
use subdomain_wrap in ids.convert 2023-10-24 15:58:03 -07:00
Ryan Barrett db29ad7757
docs: fix docstring formatting, other tweaks 2023-10-05 23:32:31 -07:00
Ryan Barrett 40ba007e9e
add User.handle() 2023-09-25 10:58:05 -07:00
Ryan Barrett 39752dc7ca
ids: allow same from and to protocol in convert_id, convert_handle 2023-09-25 10:58:05 -07:00
Ryan Barrett 6c87254efb
tests: make Fake handles use fake:handle: prefix 2023-09-22 14:53:56 -07:00
Ryan Barrett 0d33b6422d
add Protocol.owns_handle (and in subclasses) 2023-09-22 12:17:42 -07:00
Ryan Barrett 0d2ec18edd
add ids.convert_handle 2023-09-22 11:42:08 -07:00
Ryan Barrett e967bb4ada
start centralizing id conversion into new ids.py file 2023-09-22 11:42:08 -07:00