This commit is contained in:
idranme 2024-09-22 21:18:59 +08:00
parent 4f9e465fb2
commit afa06f0760
No known key found for this signature in database
GPG Key ID: 926F7B5B668E495F

View File

@ -267,6 +267,12 @@ export class NTQQMsgApi extends Service {
} }
async generateMsgUniqueId(chatType: number) { async generateMsgUniqueId(chatType: number) {
return await invoke('nodeIKernelMsgService/generateMsgUniqueId', [{ chatType }]) const uniqueId = await invoke('nodeIKernelMsgService/generateMsgUniqueId', [{ chatType }])
if (typeof uniqueId === 'string') {
return uniqueId
} else {
const random = Math.trunc(Math.random() * 100)
return `${Date.now()}${random}`
}
} }
} }