@pubuduth-aplicy/chat-ui 2.1.88 → 2.1.90
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
package/src/components/Chat.tsx
CHANGED
|
@@ -26,6 +26,10 @@ export const Chat = () => {
|
|
|
26
26
|
data: {
|
|
27
27
|
messageIds: [message._id],
|
|
28
28
|
chatId: message.conversationId, // make sure this is sent from backend
|
|
29
|
+
senderRole: message.senderRole,
|
|
30
|
+
receiverRole: message.receiverRole,
|
|
31
|
+
senderId: message.senderId,
|
|
32
|
+
receiverId: message.receiverId,
|
|
29
33
|
},
|
|
30
34
|
});
|
|
31
35
|
|
|
@@ -91,7 +91,7 @@ const Message = ({ message }: MessageProps) => {
|
|
|
91
91
|
<h4>{status}</h4>
|
|
92
92
|
<div className="details">
|
|
93
93
|
<p>Service: {booking?.serviceId}</p>
|
|
94
|
-
<p>Date: {booking?.date}</p>
|
|
94
|
+
<p>Date: {booking?.date.split('T')[0]}</p>
|
|
95
95
|
<p>Time: {booking?.time}</p>
|
|
96
96
|
</div>
|
|
97
97
|
|
|
@@ -106,7 +106,8 @@ const MessageInput = () => {
|
|
|
106
106
|
data: {
|
|
107
107
|
chatId: selectedConversation._id,
|
|
108
108
|
userId,
|
|
109
|
-
|
|
109
|
+
receiverId: otherParticipant?._id,
|
|
110
|
+
receiverRole: role === "customer" ? "provider" : "customer",
|
|
110
111
|
},
|
|
111
112
|
});
|
|
112
113
|
}
|
|
@@ -119,7 +120,8 @@ const MessageInput = () => {
|
|
|
119
120
|
data: {
|
|
120
121
|
chatId: selectedConversation._id,
|
|
121
122
|
userId,
|
|
122
|
-
|
|
123
|
+
receiverId: otherParticipant?._id,
|
|
124
|
+
receiverRole: role === "customer" ? "provider" : "customer",
|
|
123
125
|
},
|
|
124
126
|
});
|
|
125
127
|
}
|
|
@@ -383,6 +385,8 @@ const MessageInput = () => {
|
|
|
383
385
|
attachments: successfulUploads,
|
|
384
386
|
senderId: userId,
|
|
385
387
|
receiverId: otherParticipant._id,
|
|
388
|
+
receiverRole: role === "customer" ? "provider" : "customer",
|
|
389
|
+
senderRole: role,
|
|
386
390
|
},
|
|
387
391
|
});
|
|
388
392
|
},
|