Skip to content

Commit 93c708c

Browse files
committed
fix: resolve duplicated links when quoting multiple messages in ChatInput
1 parent 1fb4274 commit 93c708c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/react/src/views/ChatInput/ChatInput.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,17 +298,17 @@ const ChatInput = ({ scrollToBottom, clearUnreadDividerRef }) => {
298298
// }
299299
// }
300300

301-
const quoteArray = await Promise.all(
301+
const quoteLinks = await Promise.all(
302302
quoteMessage.map(async (quote) => {
303303
const { msg, attachments, _id } = quote;
304304
if (msg || attachments) {
305305
const msgLink = await getMessageLink(_id);
306-
quotedMessages += `[ ](${msgLink})`;
306+
return `[ ](${msgLink})`;
307307
}
308-
return quotedMessages;
308+
return '';
309309
})
310310
);
311-
quotedMessages = quoteArray.join('');
311+
quotedMessages = quoteLinks.join('');
312312
pendingMessage = createPendingMessage(
313313
`${quotedMessages}\n${message}`,
314314
userInfo

0 commit comments

Comments
 (0)