mirror of https://github.com/openclaw/openclaw.git
fix(doctor): scope discord off hint to legacy migration
This commit is contained in:
parent
285f903462
commit
59837b25bd
|
|
@ -32,6 +32,20 @@ describe("normalizeCompatibilityConfigValues preview streaming aliases", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it("does not label explicit discord streaming=false as a default-off case", () => {
|
||||
const res = normalizeCompatibilityConfigValues({
|
||||
channels: {
|
||||
discord: {
|
||||
streaming: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.config.channels?.discord?.streaming).toBe("off");
|
||||
expect(res.config.channels?.discord?.streamMode).toBeUndefined();
|
||||
expect(res.changes).toEqual(["Normalized channels.discord.streaming boolean → enum (off)."]);
|
||||
});
|
||||
|
||||
it("explains why discord preview streaming stays off when legacy config resolves to off", () => {
|
||||
const res = normalizeCompatibilityConfigValues({
|
||||
channels: {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,11 @@ export function normalizeCompatibilityConfigValues(cfg: OpenClawConfig): {
|
|||
`Normalized ${params.pathPrefix}.streaming (${beforeStreaming}) → (${resolved}).`,
|
||||
);
|
||||
}
|
||||
if (params.pathPrefix.startsWith("channels.discord") && resolved === "off") {
|
||||
if (
|
||||
params.pathPrefix.startsWith("channels.discord") &&
|
||||
resolved === "off" &&
|
||||
hadLegacyStreamMode
|
||||
) {
|
||||
changes.push(
|
||||
`${params.pathPrefix}.streaming remains off by default to avoid Discord preview-edit rate limits; set ${params.pathPrefix}.streaming="partial" to opt in explicitly.`,
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue