创建会议修正
This commit is contained in:
@@ -683,8 +683,9 @@ const subscribeToRoom = (roomId: string) => {
|
||||
|
||||
roomSubscription = stompClient.subscribe(`/topic/chat/${roomId}`, (message: any) => {
|
||||
const chatMessage = JSON.parse(message.body) as ChatRoomMessageVO
|
||||
// 避免重复添加自己发送的消息
|
||||
if (chatMessage.senderId !== loginDomain.user.userId) {
|
||||
// 避免重复添加自己发送的普通消息
|
||||
// 但会议消息(meet类型)始终添加,因为它是系统生成的通知
|
||||
if (chatMessage.messageType === 'meet' || chatMessage.senderId !== loginDomain.user.userId) {
|
||||
messages.value.push(chatMessage)
|
||||
scrollToBottom()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user