openclaw-manager 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/onboarding.js
CHANGED
|
@@ -58,11 +58,7 @@ async function readDiscordTokenConfigured(runCommand) {
|
|
|
58
58
|
}
|
|
59
59
|
async function readDiscordAllowFromConfigured(runCommand) {
|
|
60
60
|
const value = await readConfigValue(runCommand, "channels.discord.dm.allowFrom");
|
|
61
|
-
|
|
62
|
-
return value.length > 0;
|
|
63
|
-
if (value === "*")
|
|
64
|
-
return true;
|
|
65
|
-
return false;
|
|
61
|
+
return Array.isArray(value) ? value.length > 0 : false;
|
|
66
62
|
}
|
|
67
63
|
async function readPendingDiscordPairings(runCommand) {
|
|
68
64
|
try {
|
|
@@ -26,7 +26,7 @@ async function ensureDiscordDmAllow(runCommand) {
|
|
|
26
26
|
if (value) {
|
|
27
27
|
try {
|
|
28
28
|
const parsed = JSON.parse(value);
|
|
29
|
-
if (
|
|
29
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -34,5 +34,5 @@ async function ensureDiscordDmAllow(runCommand) {
|
|
|
34
34
|
// ignore parse failure and attempt to set
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
await runCommand("clawdbot", ["config", "set", "channels.discord.dm.allowFrom", "
|
|
37
|
+
await runCommand("clawdbot", ["config", "set", "channels.discord.dm.allowFrom", "[\"*\"]"], 8000);
|
|
38
38
|
}
|