Skip to content

Commit

Permalink
ATProto.send: generate link preview external embeds for first link in…
Browse files Browse the repository at this point in the history
… content

for #1411
  • Loading branch information
snarfed committed Nov 29, 2024
1 parent 20dc814 commit c75f74d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def fetch_blob(url, blob_field, name, check_size=True, check_type=True):
try:
ret = bluesky.from_as1(cls.translate_ids(obj.as1), blobs=blobs,
client=client, original_fields_prefix='bridgy',
as_embed=as_embed)
as_embed=as_embed, first_link_embed=True)
except (ValueError, RequestException):
logger.info(f"Couldn't convert to ATProto", exc_info=True)
return {}
Expand Down
1 change: 1 addition & 0 deletions tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def test_activitypub_follow_bsky_bot_bad_username_error(self, mock_get):
requests_response(PROFILE_GETRECORD), # alice profile
requests_response(DID_DOC), # alice DID
requests_response(PROFILE_GETRECORD), # alice profile
requests_response(''), # fed.brid.gy/docs for preview embed
requests_response({ # getConvoForMembers
'convo': {
'id': 'convo123',
Expand Down

0 comments on commit c75f74d

Please sign in to comment.