diff --git a/README.md b/README.md index e6290ea3..1ee9f0d2 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,7 @@ Changelog * `com.atproto.repo.strongRef` * Add hashtag facet support. * Convert blobs in embeds to `getBlob` image URLs. + * `app.bsky.actor.profile`: add HTML links for URLs in `summary` ([snarfed/bridgy-fed#1065](https://github.com/snarfed/bridgy-fed/issues/1065)). * `from_as1`: * Add hashtag, mention, block, and flag support. Interpret `tags` with missing `objectType` as hashtags. * Guess missing indices in facets based on content text. Otherwise, if we still don't know a facet's indices, discard it. diff --git a/granary/bluesky.py b/granary/bluesky.py index 3ac21f1e..09a828fb 100644 --- a/granary/bluesky.py +++ b/granary/bluesky.py @@ -915,7 +915,7 @@ def to_as1(obj, type=None, uri=None, repo_did=None, repo_handle=None, 'url': urls, 'displayName': obj.get('displayName'), 'username': obj.get('handle') or repo_handle, - 'summary': obj.get('description'), + 'summary': util.linkify(obj.get('description') or '', pretty=True), 'image': images, 'published': obj.get('createdAt'), } diff --git a/granary/tests/test_bluesky.py b/granary/tests/test_bluesky.py index 5c405b38..32b5c4c4 100644 --- a/granary/tests/test_bluesky.py +++ b/granary/tests/test_bluesky.py @@ -1346,6 +1346,15 @@ def test_to_as1_profile(self): 'url': ['https://bsky.app/profile/han.dull', 'https://han.dull/'], }, to_as1(ACTOR_PROFILE_BSKY, repo_did='did:plc:foo', repo_handle='han.dull')) + def test_to_as1_profile_links_in_bio(self): + self.assert_equals({ + 'objectType': 'person', + 'summary': 'one li.nk/foo two li.nk three li.nk', + }, to_as1({ + '$type': 'app.bsky.actor.profile', + 'description': 'one http://li.nk/foo two li.nk three https://www.li.nk/', + })) + def test_to_as1_profile_bsky_social_handle_is_not_url(self): self.assert_equals({ 'objectType': 'person',