Repository navigation
plugins: support rich messages in repositories - #80
Open
berkmirsatk wants to merge 3 commits into
Open
berkmirsatk wants to merge 3 commits into
berkmirsatk wants to merge 3 commits into
Conversation
Message responses are plain Java objects, so they need no disableFree guard; the guard was also released before the paginated lookups that still read the page finished. Repository rows now number documents as first seen instead of truncating random document ids to 16 bits.
Owner
|
i dont really think it's a good idea to fetch the entire channel history to search for plugins i believe the correct fix here would be a server-side fix for the filter to include files from rich messages |
This branch has not been deployed
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.
Support plugin discovery from rich channel messages in repository listings and update checks.
Problem
Plugin repositories only listed
.inu.jsfiles sent as regular documents. Repositories were read withmessages.searchandinputMessagesFilterDocument, which does not return files embedded in rich messages. A channel that publishes each release as a rich post with the installer inside showed no plugins, and installs from those posts could not receive updates.Changes
loadPageusesmessages.getHistoryand collects installers from bothmedia.documentandrich_message.documents. A file repeated inside one post is listed once; separate installers in one post are listed separately.part = true, which may omit the installer. Such messages are completed withgetRichMessagebefore deciding which plugins a page contains. They are resolved one at a time to keep channel order and bound the requests in flight.refreshDocumentcompletes the post the same way and resumes only the same document, so a post edited to a different installer cannot switch an in-flight download.PluginRepoActivitykeys rows by document id, since one post can now hold several installers, and numbers documents as first seen instead of truncating the random 64-bit id to 16 bits.Behaviour to note
If completing a single partial rich message fails, the whole page is treated as failed so it can be retried, instead of showing an incomplete repository. This is right for network and server errors, but a rich post that can never be loaded (deleted or no longer accessible) would make that repository fail on every update check. If you prefer, I can make it fail the page only on network/server errors and skip a message the server reports as missing.
Validation
PluginReposTestcover regular and rich installers with their origin, completion of partial rich messages, failed and mismatched completions, cursor advance on pages without plugins, and expired references for rich documents, including an edited installer.Screenshots
Plugin discovery from a rich channel post, verified on a physical Android device.

