This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Repository navigation
Conversation
Contributor
Author
|
Superseded by #63, which includes this change or replaces it. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #43.
A program that starts
compa-kernel gatewaycould set the web chat's token withCOMPA_CHANNELS_WEB_TOKEN, but no variable turned the channel on. So it had to writechannel_list.webintoconfig.json. Because a file entry replaces the default one whole, it also had to write streaming and the rest, and keep them in step with Compa's defaults.Now:
COMPA_CHANNELS_<NAME>_ENABLEDsets achannel_listentry'senabled.<NAME>is the entry's name in capitals, with_for each character other than a letter or digit, soCOMPA_CHANNELS_WEB_ENABLED=trueturns on the default web entry, streaming included.initChannelList, next to the settings' env tags, so it applies to every entry, the defaults included.COMPA_CHANNELS_WEB_STREAMING_ENABLED,_THROTTLE_SECONDSand_MIN_GROWTH_CHARSset the web chat's streaming. They work like Telegram's existing variables, which now share their code (applyStreamingEnvOverrides).SaveConfigwrites the file's value back, as for the other variables.docs/cli.mdlists the variables. It also says that saving keeps a file's value for a setting a variable set, unless you change the setting. CHANGELOG line under Added.Tests:
TestChannelEnabledEnvOverrideloads a config with the variables set. It checks that web turns on, Telegram turns off and web streaming turns off. AfterSaveConfig, the file keeps its own values for all three.TestChannelEnabledEnvOverrideRejectsABadValueandTestChannelEnabledEnvNamecover a bad value and the name mapping.