Skip to content

Commit

Permalink
refactor: 消息id拼接逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 committed Oct 11, 2022
1 parent dad8996 commit 5580c1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/listener/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const normalizeDanmu = <T>(msgType: string, body: T): Message<T> => {
const timestamp = Date.now()
const randomText = Math.floor(Math.random() * 10000).toString()
// @ts-ignore
const id = `${timestamp}_${msgType}_${body.user?.uid}_${randomText}`
const id = `${timestamp}:${msgType}:${body.user?.uid}:${randomText}`
return {
id,
timestamp,
Expand Down

0 comments on commit 5580c1a

Please sign in to comment.