Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to original AP profile to bridge accounts on Bsky #976

Closed
qazmlp opened this issue Apr 29, 2024 · 11 comments
Closed

Add link to original AP profile to bridge accounts on Bsky #976

qazmlp opened this issue Apr 29, 2024 · 11 comments
Labels

Comments

@qazmlp
Copy link

qazmlp commented Apr 29, 2024

Maybe this is implemented already, in which case it's not working if the bio is so long that it gets cut off.

The bridge may have to truncate the bio itself to make it fit Bsky's constraints, until/unless Bsky raises its display limits for accounts hosted elsewhere.

@snarfed
Copy link
Owner

snarfed commented Apr 29, 2024

Yes! Great point. We do this sometimes, in some places, eg see @[email protected] on the fediverse, screenshot below, but it's inconsistent. Fortunately, I know why, shouldn't be a difficult fix.

image

@snarfed
Copy link
Owner

snarfed commented May 14, 2024

First pass at this is done! Still a bit awkward, too much vertical whitespace, needs links, and needs to prioritize the label during truncation, but it's a start.

image

@snarfed
Copy link
Owner

snarfed commented May 21, 2024

Bluesky profile descriptions don't have facets, so we can't link arbitrary text. I think the best we can do right now is include URLs, and they'll get auto-linked. Sigh. More details: bluesky-social/atproto#2504

@snarfed
Copy link
Owner

snarfed commented May 21, 2024

Also the truncation should break at word boundaries. As an example, we cut off a URL in https://bsky.app/profile/did:plc:whco57z2rz6jvi3wv3o56jdi, which is awkward.

@snarfed
Copy link
Owner

snarfed commented Jun 6, 2024

OK, I think I'm happy with where this is right now. Examples:

https://bsky.app/profile/snarfed.indieweb.social.ap.brid.gy

[bridged from indieweb.social/@snarfed on the fediverse by fed.brid.gy ]

image

https://indieweb.social/@[email protected]

[bridged from snarfed.bsky.social on Bluesky by Bridgy Fed]

image

@snarfed
Copy link
Owner

snarfed commented Jun 6, 2024

Now to update existing users' profiles. Running this now:

import pages

users = (
  ActivityPub.query(ActivityPub.enabled_protocols == 'atproto',
                    ActivityPub.status == None).fetch()
  + ATProto.query(ATProto.enabled_protocols == 'activitypub',
                  ATProto.status == None).fetch())

logging.getLogger().setLevel(logging.ERROR)

for i, user in enumerate(users):
  print(i, user.key.id(), user.handle)
  pages.update_profile(user, user)

@snarfed
Copy link
Owner

snarfed commented Jun 6, 2024

Argh, scratch that, I still need to prevent the "bridged from" snippet from getting truncated.

@snarfed
Copy link
Owner

snarfed commented Jun 6, 2024

OK, done with that, restarting the backfill now.

@qazmlp
Copy link
Author

qazmlp commented Jun 7, 2024

Worked on my profile, thank you!

@snarfed
Copy link
Owner

snarfed commented Jun 7, 2024

Great! Backfill is done, but I noticed that we're not preserving whitespace in ATProto => ActivityPub. Ugh, ok, doing that now.

@snarfed
Copy link
Owner

snarfed commented Jun 7, 2024

Done in snarfed/granary@85b9e19. Not going to bother re-backfilling all of those profiles; they'll refresh on their own eventually.

@snarfed snarfed closed this as completed Jun 7, 2024
@snarfed snarfed added now and removed now labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants