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

@ -100,7 +100,7 @@ test('QQ runtime sends a proactive connection test to the explicit owner fallbac
await runtime.stop();
});
test('QQ runtime requires /status for wildcard owners and strips the remembered reply id', async () => {
test('QQ runtime requires a remembered private target for wildcard owners and strips the reply id', async () => {
const bot = new FakeBot();
const state = {};
const runtime = new QqRuntime({
@ -119,7 +119,7 @@ test('QQ runtime requires /status for wildcard owners and strips the remembered
(error) => error?.code === 'test-target-unavailable',
);
rememberConnectionTestTarget(state, {
scope: 'c2c', targetId: 'recent-user', msgId: 'old-status-message',
scope: 'c2c', targetId: 'recent-user', msgId: 'old-inbound-message',
});
await runtime.sendConnectionTest('remembered-target');
assert.deepEqual(bot.sent, [{