fix: remember direct recipients for connection tests

This commit is contained in:
xmanrui 2026-08-19 11:24:50 +08:00
parent fb61c4235f
commit 3ac70a7c65
34 changed files with 397 additions and 178 deletions

View file

@ -206,7 +206,7 @@ export function normalizeSnapshot(value) {
export function connectionTestFeedback(result) {
if (result?.sent === true) return '钉钉连接检查完成,测试消息已发送。';
if (result?.code === 'test-target-unavailable') {
return '钉钉连接检查完成。请先私聊机器人发送 /status,再重新检查。';
return '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
}
return result ? '钉钉连接检查完成,但测试消息发送失败。' : null;
}

View file

@ -335,7 +335,7 @@ function connectionTestNotice(value) {
return '测试消息已发送,请到飞书会话中确认。';
}
if (value?.testMessage?.code === 'test-target-unavailable') {
return '连接检查完成,但当前没有可用的测试消息接收人。';
return '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
}
return value?.testMessage ? '连接检查完成,但测试消息发送失败。' : null;
}

View file

@ -124,7 +124,7 @@ export function normalizeSnapshot(value) {
export function connectionTestFeedback(result) {
if (result?.sent === true) return '测试消息已发送,请到对应机器人会话中确认。';
if (result?.code === 'test-target-unavailable') {
return '连接检查完成。请先私聊机器人发送 /status,再重新检查。';
return '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
}
return result ? '连接检查完成,但测试消息发送失败。' : null;
}

View file

@ -33,7 +33,7 @@ function checkedTime(value) {
function connectionTestNotice(value) {
if (value?.testMessage?.sent === true) return '测试消息已发送,请到对应机器人会话中确认。';
if (value?.testMessage?.code === 'test-target-unavailable') {
return '连接检查完成。请先私聊机器人发送 /status,再重新检查。';
return '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
}
return value?.testMessage ? '连接检查完成,但测试消息发送失败。' : null;
}

View file

@ -410,7 +410,7 @@ export function WecomSettingsTab({ rpcCall }) {
} else if (snapshot.testMessage?.sent) {
feedback = '企业微信连接检查完成,测试消息已发送。';
} else if (snapshot.testMessage?.code === 'test-target-unavailable') {
feedback = '企业微信连接检查完成。请先私聊机器人发送 /status,再重新检查。';
feedback = '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
} else if (snapshot.testMessage) {
feedback = '企业微信连接检查完成,但测试消息发送失败。';
} else {

View file

@ -524,7 +524,7 @@ export function WeixinSettingsTab({ rpcCall }) {
} else if (snapshot.testMessage?.sent) {
feedback = '微信连接检查完成,测试消息已发送。';
} else if (snapshot.testMessage?.code === 'test-target-unavailable') {
feedback = '微信连接检查完成。请先私聊机器人发送 /status,再重新检查。';
feedback = '连接检查完成。机器人尚未收到可用于测试的私聊消息。';
} else if (snapshot.testMessage) {
feedback = '微信连接检查完成,但测试消息发送失败。';
} else {

View file

@ -77,20 +77,16 @@ const EN = Object.freeze({
'检查中…': 'Checking…',
'连接检查失败,请稍后重试。': 'Connection check failed. Try again later.',
'测试消息已发送,请到对应机器人会话中确认。': 'Test message sent. Check the matching bot conversation.',
'连接检查完成。请先私聊机器人发送 /status,再重新检查。': 'Connection check completed. Send /status to the bot in a direct message, then check again.',
'连接检查完成。机器人尚未收到可用于测试的私聊消息。': 'Connection check completed. The bot has not received a direct message it can use for testing.',
'连接检查完成,但测试消息发送失败。': 'Connection check completed, but the test message could not be sent.',
'测试消息已发送,请到飞书会话中确认。': 'Test message sent. Check the Feishu conversation.',
'连接检查完成,但当前没有可用的测试消息接收人。': 'Connection check completed, but no test-message recipient is available.',
'测试消息已发送,请到 WhatsApp 自聊会话中确认。': 'Test message sent. Check the WhatsApp self-chat.',
'连接检查完成,但当前没有可用的 WhatsApp 自聊目标。': 'Connection check completed, but no WhatsApp self-chat target is available.',
'钉钉连接检查完成,测试消息已发送。': 'DingTalk connection check completed and the test message was sent.',
'钉钉连接检查完成。请先私聊机器人发送 /status,再重新检查。': 'DingTalk connection check completed. Send /status to the bot in a direct message, then check again.',
'钉钉连接检查完成,但测试消息发送失败。': 'DingTalk connection check completed, but the test message could not be sent.',
'微信连接检查完成,测试消息已发送。': 'WeChat connection check completed and the test message was sent.',
'微信连接检查完成。请先私聊机器人发送 /status,再重新检查。': 'WeChat connection check completed. Send /status to the bot in a direct message, then check again.',
'微信连接检查完成,但测试消息发送失败。': 'WeChat connection check completed, but the test message could not be sent.',
'企业微信连接检查完成,测试消息已发送。': 'WeCom connection check completed and the test message was sent.',
'企业微信连接检查完成。请先私聊机器人发送 /status,再重新检查。': 'WeCom connection check completed. Send /status to the bot in a direct message, then check again.',
'企业微信连接检查完成,但测试消息发送失败。': 'WeCom connection check completed, but the test message could not be sent.',
'重试连接': 'Reconnect',
'重试中…': 'Retrying…',