Skip to content

Commit

Permalink
fix: fixed an issue where the inbox groupId was incorrect when replyi…
Browse files Browse the repository at this point in the history
…ng in a private conversation
  • Loading branch information
moonrailgun committed Nov 13, 2023
1 parent 6e71a2a commit 5b16ff9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/services/core/chat/message.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class MessageService extends TcService {

ctx.emit('chat.message.updateMessage', {
type: 'add',
groupId: String(groupId),
groupId: groupId ? String(groupId) : undefined,
converseId: String(converseId),
messageId: String(message._id),
author: userId,
Expand Down Expand Up @@ -323,7 +323,7 @@ class MessageService extends TcService {
this.roomcastNotify(ctx, converseId, 'update', json);
ctx.emit('chat.message.updateMessage', {
type: 'recall',
groupId: String(groupId),
groupId: groupId ? String(groupId) : undefined,
converseId: String(converseId),
messageId: String(message._id),
meta: message.meta ?? {},
Expand Down Expand Up @@ -371,7 +371,7 @@ class MessageService extends TcService {
this.roomcastNotify(ctx, converseId, 'delete', { converseId, messageId });
ctx.emit('chat.message.updateMessage', {
type: 'delete',
groupId: String(groupId),
groupId: groupId ? String(groupId) : undefined,
converseId: String(converseId),
messageId: String(message._id),
meta: message.meta ?? {},
Expand Down

0 comments on commit 5b16ff9

Please sign in to comment.