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
@@ -8,6 +8,10 @@ describe('hashMessageIdInt32', () => {
|
||||
expect(id1).toBe(id2);
|
||||
});
|
||||
|
||||
it('preserves negative hashes as valid message IDs', () => {
|
||||
expect(hashMessageIdInt32(1, 12345, PRIVATE_MESSAGE_EVENT)).toBe(-585543322);
|
||||
});
|
||||
|
||||
it('returns non-zero', () => {
|
||||
// The function ensures id !== 0 by setting it to 1
|
||||
const id = hashMessageIdInt32(0, 0, '');
|
||||
|
||||
Reference in new issue
Block a user