Fix the /embed endpoint #540

Merged
floatingghost merged 2 commits from mikihau/akkoma:develop into develop 2023-07-15 20:48:31 +00:00
Contributor

The /embed/<notice_id> endpoint was introduced a couple of years ago (with this merge request), but it's currently broken and returning 500.

This pull request puts this endpoint back to work again, so that we can embed a post with a snippet like this:

<iframe src="http://<host>/embed/<id>" class="pleroma-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe>
<script src="http://<host>/embed/embed.js" async="async">
The `/embed/<notice_id>` endpoint was introduced a couple of years ago (with [this merge request](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/2319)), but it's currently broken and returning 500. This pull request puts this endpoint back to work again, so that we can embed a post with a snippet like this: ``` <iframe src="http://<host>/embed/<id>" class="pleroma-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe> <script src="http://<host>/embed/embed.js" async="async"> ```
mikihau requested review from Owners 2023-05-14 19:49:29 +00:00
mikihau started working 2023-05-15 12:36:20 +00:00
mikihau canceled time tracking 2023-05-15 12:36:26 +00:00
Contributor

Embed.css and embed.js are copied from the original (pleroma) merge request.

Please don't just copy files, especially when they are licensed in a way that requires attribution. A better way could be cherry-picking the relevant commit, or adding the files with a commit where you correctly set the author.

> Embed.css and embed.js are copied from the original (pleroma) merge request. Please don't just copy files, especially when they are licensed in a way that requires attribution. A better way could be cherry-picking the relevant commit, or adding the files with a commit where you correctly set the author.
mikihau force-pushed develop from 6ebf4046ea to 593ddbd796 2023-05-31 23:42:24 +00:00 Compare
Author
Contributor

@ilja Sounds good -- I cherry-picked the original commit so now the files should be correctly attributed. Whenever you're ready please take a look again.

@ilja Sounds good -- I cherry-picked the original commit so now the files should be correctly attributed. Whenever you're ready please take a look again.

this seems fine , thanks a lot!

this seems fine , thanks a lot!
floatingghost merged commit 210df6fe92 into develop 2023-07-15 20:48:31 +00:00
Sign in to join this conversation.
No description provided.