diff --git a/src/lib/msgUtils.js b/src/lib/msgUtils.js
index de9f751..7106650 100644
--- a/src/lib/msgUtils.js
+++ b/src/lib/msgUtils.js
@@ -48,6 +48,7 @@ const mediaMsg = {
...(msg.context
? {
reply: {
+ id: msg.message_origin.id,
message: msg.message_origin.text,
title: msg.message_origin.senderName || 'Reference',
titleColor: msg.message_origin?.senderName !== 'me' ? '#a791ff' : '#128c7e',
@@ -76,6 +77,7 @@ export const sentMsgTypeMapped = {
...(msg.context
? {
reply: {
+ id: msg.message_origin.id,
message: msg.message_origin.text,
title: msg.message_origin.senderName || 'Reference',
titleColor: msg.message_origin?.senderName !== 'me' ? '#a791ff' : '#128c7e',
diff --git a/src/views/Conversations/Components/Messages.jsx b/src/views/Conversations/Components/Messages.jsx
index 1f6a3ce..2e64da0 100644
--- a/src/views/Conversations/Components/Messages.jsx
+++ b/src/views/Conversations/Components/Messages.jsx
@@ -1,5 +1,5 @@
import { useEffect, useState, useRef, useMemo, memo, createRef, forwardRef } from 'react';
-import { Image, Spin, Dropdown } from 'antd';
+import { Image, Spin, Dropdown, Button } from 'antd';
import { DownOutlined } from '@ant-design/icons';
import { MessageBox } from 'react-chat-elements';
import useConversationStore from '@/stores/ConversationStore';
@@ -17,7 +17,7 @@ const Messages = () => {
const scrollToMessage = (id, index) => {
const _i = index || activeMessages.findIndex((msg) => msg.id === id);
if (_i >= 0) {
- messageRefs.current[_i].current.scrollIntoView({ behavior: "smooth", block: "start" });
+ messageRefs.current[_i].current.scrollIntoView({ behavior: "smooth", block: "center" });
}
}
@@ -115,13 +115,15 @@ const Messages = () => {
}
: {
replyButton: ['text'].includes(message.whatsapp_msg_type) ? true : false,
+ className: 'whitespace-pre-wrap',
})}
/>
//
))}
-
+
+
);
};