mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-17 22:00:47 +08:00
fix: remember direct recipients for connection tests
This commit is contained in:
parent
fb61c4235f
commit
3ac70a7c65
34 changed files with 397 additions and 178 deletions
|
|
@ -177,6 +177,12 @@ export class QqHarnessBridge {
|
|||
|| this.#acceptedMessageIds.has(messageId)) return Promise.resolve();
|
||||
const key = conversationKey(message);
|
||||
this.#acceptedMessageIds.add(messageId);
|
||||
if (message.kind === 'c2c'
|
||||
&& (this.#ownerUserOpenid === '*' || sender === this.#ownerUserOpenid)
|
||||
&& message.replyTarget?.scope === 'c2c'
|
||||
&& nonEmptyString(message.replyTarget.targetId) === sender) {
|
||||
rememberConnectionTestTarget(this.#state, message.replyTarget);
|
||||
}
|
||||
const pending = this.#pendingInteractions.get(key);
|
||||
const approval = this.#approvals.claimReply({
|
||||
key,
|
||||
|
|
@ -296,11 +302,6 @@ export class QqHarnessBridge {
|
|||
}
|
||||
if (!hasImages && command === '/status') {
|
||||
await this.#harness.ensureRunning({ signal: this.#signal });
|
||||
if (message.kind === 'c2c'
|
||||
&& target?.scope === 'c2c'
|
||||
&& nonEmptyString(target.targetId) === sender) {
|
||||
rememberConnectionTestTarget(this.#state, target);
|
||||
}
|
||||
await this.#bot.sendText(target, 'QQ 机器人与 DeepSeek Harness 连接正常。');
|
||||
await this.#state.markSeen(messageId);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue