fix(onebot): resolve voice transcription for signed message IDs
Allow voice transcription results to complete for messages with negative IDs while preserving existing message identities and account isolation. Report unmatched transcription results accurately and document the signed message ID contract. Fixes #554
This commit is contained in:
10 files changed
+153
-18
No files matched your search
@@ -166,7 +166,8 @@ type PipelineEventReason =
|
||||
| 'pipeline_threw'
|
||||
| 'recalled_before_backfill'
|
||||
| 'recalled_after_backfill'
|
||||
| 'waiter_notified';
|
||||
| 'waiter_notified'
|
||||
| 'waiter_not_found';
|
||||
|
||||
async function convertAndDispatch(
|
||||
ctx: OneBotInstanceContext,
|
||||
@@ -458,8 +459,14 @@ function handlePttTransResult(
|
||||
event: Extract<QQEventVariant, { kind: 'ptt_trans_result' }>,
|
||||
state: EventTraceState,
|
||||
): void {
|
||||
deliverPttTransText(pttTransKey(event.selfUin, event.msgId), event.text);
|
||||
traceEventTerminal(log, event.kind, state, 'internal', 'waiter_notified');
|
||||
const notified = deliverPttTransText(pttTransKey(event.selfUin, event.msgId), event.text);
|
||||
traceEventTerminal(
|
||||
log,
|
||||
event.kind,
|
||||
state,
|
||||
'internal',
|
||||
notified ? 'waiter_notified' : 'waiter_not_found',
|
||||
);
|
||||
}
|
||||
|
||||
function convertOnly<K extends EventKind>(
|
||||
|
||||
Reference in new issue
Block a user