@pubuduth-aplicy/chat-ui 2.1.23 → 2.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@ const MessageInput = () => {
|
|
|
19
19
|
return;
|
|
20
20
|
if (selectedConversation?._id) {
|
|
21
21
|
// Send message
|
|
22
|
-
sendMessage({ chatId:selectedConversation._id,senderId:userId, message });
|
|
22
|
+
sendMessage({ chatId:selectedConversation.participantDetails._id,senderId:userId, message });
|
|
23
23
|
|
|
24
24
|
// Emit message to socket
|
|
25
25
|
socket.emit('sendMessage', { chatId: selectedConversation._id, message });
|
|
26
26
|
}
|
|
27
|
-
setMessage("");
|
|
27
|
+
setMessage("");
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -38,7 +38,7 @@ console.log(conversation);
|
|
|
38
38
|
<div className="chatSidebarConversationContainer">
|
|
39
39
|
{/* <div className="chatSidebarConversationInnerDiv"> */}
|
|
40
40
|
<p className="text-sm text-gray-500">
|
|
41
|
-
{conversation.participantDetails
|
|
41
|
+
{conversation.participantDetails?.firstname}
|
|
42
42
|
</p>
|
|
43
43
|
<p className="chatSidebarConversationOuterDiv">
|
|
44
44
|
Do you know which
|
|
@@ -4,7 +4,7 @@ import { Path } from "../lib/api/endpoint";
|
|
|
4
4
|
|
|
5
5
|
export const sendMessage = async ({ chatId,senderId, message }: { chatId: any; senderId:any; message: string }) => {
|
|
6
6
|
const response = await apiClient.post(`${Path.sendmessage}/${chatId}/${senderId}`, {
|
|
7
|
-
message
|
|
7
|
+
message:message
|
|
8
8
|
})
|
|
9
9
|
return response.data;
|
|
10
10
|
};
|