mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 12:41:12 +00:00
test: reuse channel status account ids
This commit is contained in:
@@ -169,10 +169,11 @@ function createTelegramCommandTestPlugin(): ChannelPlugin {
|
||||
return [];
|
||||
}
|
||||
const issues: ChannelStatusIssue[] = [];
|
||||
const issueAccountId = account.accountId ?? DEFAULT_ACCOUNT_ID;
|
||||
if (account.allowUnmentionedGroups === true) {
|
||||
issues.push({
|
||||
channel: "telegram",
|
||||
accountId: String(account.accountId ?? DEFAULT_ACCOUNT_ID),
|
||||
accountId: issueAccountId,
|
||||
kind: "config",
|
||||
message:
|
||||
"Config allows unmentioned group messages (requireMention=false). Telegram Bot API privacy mode will block most group messages unless disabled.",
|
||||
@@ -187,7 +188,7 @@ function createTelegramCommandTestPlugin(): ChannelPlugin {
|
||||
if (audit?.hasWildcardUnmentionedGroups === true) {
|
||||
issues.push({
|
||||
channel: "telegram",
|
||||
accountId: String(account.accountId ?? DEFAULT_ACCOUNT_ID),
|
||||
accountId: issueAccountId,
|
||||
kind: "config",
|
||||
message:
|
||||
'Telegram groups config uses "*" with requireMention=false; membership probing is not possible without explicit group IDs.',
|
||||
@@ -199,7 +200,7 @@ function createTelegramCommandTestPlugin(): ChannelPlugin {
|
||||
}
|
||||
issues.push({
|
||||
channel: "telegram",
|
||||
accountId: String(account.accountId ?? DEFAULT_ACCOUNT_ID),
|
||||
accountId: issueAccountId,
|
||||
kind: "runtime",
|
||||
message: `Group ${group.chatId} not reachable by bot.${group.status ? ` status=${group.status}` : ""}${group.error ? `: ${group.error}` : ""}`,
|
||||
});
|
||||
@@ -240,13 +241,14 @@ function setMinimalChannelsCommandRegistryForTests(): void {
|
||||
return [];
|
||||
}
|
||||
const issues: ChannelStatusIssue[] = [];
|
||||
const issueAccountId = account.accountId ?? DEFAULT_ACCOUNT_ID;
|
||||
const messageContent = (
|
||||
account.application as { intents?: { messageContent?: string } } | undefined
|
||||
)?.intents?.messageContent;
|
||||
if (messageContent === "disabled") {
|
||||
issues.push({
|
||||
channel: "discord",
|
||||
accountId: String(account.accountId ?? DEFAULT_ACCOUNT_ID),
|
||||
accountId: issueAccountId,
|
||||
kind: "intent",
|
||||
message:
|
||||
"Message Content Intent is disabled. Bot may not see normal channel messages.",
|
||||
@@ -268,7 +270,7 @@ function setMinimalChannelsCommandRegistryForTests(): void {
|
||||
}
|
||||
issues.push({
|
||||
channel: "discord",
|
||||
accountId: String(account.accountId ?? DEFAULT_ACCOUNT_ID),
|
||||
accountId: issueAccountId,
|
||||
kind: "permissions",
|
||||
message: `Channel ${channel.channelId} permission audit failed.${channel.missing?.length ? ` missing ${channel.missing.join(", ")}` : ""}${channel.error ? `: ${channel.error}` : ""}`,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user