Expose quote post content in Fediverse events - #11
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Owncast plugin SDK to support a richer fediverse.quote event payload so plugins can access both the remote quote post permalink (url) and optional quote content metadata (content / contentText) when provided by the originating Fediverse server.
Changes:
- Added a new
FediverseQuoteJavaScript type and updated the JS SDK handler signature foronFediverseQuoteto use it. - Updated wire protocol and author documentation to clarify the difference between the local quoted post (
target.url) and the remote quote post (url). - Updated the JS and Python engagement-bot examples and scenario fixtures to forward the quote caption and remote permalink.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdks/js/index.d.ts | Introduces FediverseQuote and updates onFediverseQuote typing/documentation to expose remote quote URL + optional content metadata. |
| examples/python/engagement-bot/src/plugin.py | Uses event.content_text (caption) and event.url (remote permalink) when posting Discord notifications for quotes. |
| examples/python/engagement-bot/tests/mod.test.json | Extends the quote fixture with contentText and url and updates expected Discord output accordingly. |
| examples/js/engagement-bot/src/plugin.js | Uses event.contentText (caption) and event.url (remote permalink) when posting Discord notifications for quotes. |
| examples/js/engagement-bot/tests/mod.test.json | Extends the quote fixture with contentText and url and updates expected Discord output accordingly. |
| docs/WIRE_PROTOCOL.md | Documents fediverse.quote as FediverseQuote and adds the FediverseQuote type definition to the wire contract. |
| docs/PLUGIN_AUTHOR_GUIDE.md | Updates author guidance to describe FediverseQuote and the semantics of target.url vs url, including optional content fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the SDK for the richer
fediverse.quotepayload from owncast/owncast#5104, so plugins can use the remote quote caption and permalink.FediverseQuoteJavaScript type with the remote post URL and optional content metadatatarget.urland remote quote posturlThe content fields remain optional because some Fediverse servers send the QuoteRequest instrument as an IRI instead of an embedded Note.
Fixes owncast/owncast#5103