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

Issue 238: Add Support for Bluesky #239

Conversation

RyanCMcConnell
Copy link

Added BlueSky to the default sites list and MediaPack bundle.

@RyanCMcConnell RyanCMcConnell force-pushed the issue-238-add-support-for-bluesky branch 3 times, most recently from b025da9 to b144f82 Compare October 21, 2024 19:35
@RyanCMcConnell RyanCMcConnell force-pushed the issue-238-add-support-for-bluesky branch from b144f82 to ac9a9e9 Compare October 21, 2024 19:51
@RyanCMcConnell
Copy link
Author

@JoshyPHP I have got it working so that it embeds BlueSky posts using the API. I've added it to the DefaultSites list as well as the MediaPack bundle. Please let me know if I missed anything or anything needs to change.

@JoshyPHP
Copy link
Member

Sorry for not coming back to this sooner. I've just published a commit that adds support for Bluesky in a manner that's conceptually different from what you proposed in this PR. In order to support different environments I use a third party iframe hosted here on GitHub. Among other things, it makes it easier to communicate with it without interfering with the rest of the page.

Please check it out at your leisure and let me know if it works as expected or it I overlooked anything. I'm going to close this PR but feel free to continue this discussion in #238.

@JoshyPHP JoshyPHP closed this Nov 11, 2024
@iMattPro
Copy link

iMattPro commented Nov 15, 2024

Does anyone know why this isn't working, @JoshyPHP ? Specifically, the scrape that is trying to capture the DID simply isnt providing that value to the resulting iframe src code. That just results in BlueSky returning this: Invalid DID: DID syntax didn't validate via regex. The iframe rendered is just: https://embed.bsky.app/embed/did:/app.bsky.feed.post/3l6kscjixz22q

name: Bluesky
host: bsky.app
homepage: https://bsky.app/
example: https://bsky.app/profile/jamesgunn.bsky.social/post/3l6kscjixz22q
extract: "!bsky\\.app/profile/(?'name'[A-Za-z0-9.]+)/post/(?'id'\\w+)!"
oembed:
    endpoint: https://embed.bsky.app/oembed
    scheme: https://bsky.app/profile/{@name}/post/{@id}
scrape:
    - extract: "!\"did\":\\s*\"did:(?'did'[a-zA-Z0-9._:%-]+)\"!"
    - match: "//"
    - url: https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor={@name}
iframe:
    width: "550"
    height: "350"
    src: https://embed.bsky.app/embed/did:{@did}/app.bsky.feed.post/{@id}

@JoshyPHP
Copy link
Member

I don't know, I went with a different approach so I didn't really test that PR. I recommend you use the definition that's currently in the repo.

@iMattPro
Copy link

That seems to rely on classes/files that don't exist in the version we are stuck using.

@JoshyPHP
Copy link
Member

I don't think so, although I can't test it right now. You or @rxu open an issue in the phpBB extension's repo, tag me and we can continue the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants