mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-14 11:17:50 +00:00
sendMsg之后,接收deliveredMsg的回调函数绑定到tempMsgId
This commit is contained in:
@@ -3,7 +3,7 @@ import { proto } from '@/const/msgConst'
|
||||
import { userStore } from '@/stores'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
export const chatConstructor = (toId, content) => {
|
||||
export const chatConstructor = (toId, content, tempMsgId) => {
|
||||
const header = Header.create({
|
||||
magic: proto.magic,
|
||||
version: proto.version,
|
||||
@@ -17,7 +17,7 @@ export const chatConstructor = (toId, content) => {
|
||||
fromClient: userData.clientId,
|
||||
toId: toId,
|
||||
content: content,
|
||||
tempMsgId: uuidv4()
|
||||
tempMsgId: tempMsgId
|
||||
})
|
||||
const chatMsg = Msg.create({ header: header, body: body })
|
||||
const payload = Msg.encode(chatMsg).finish()
|
||||
|
||||
Reference in New Issue
Block a user