@pubuduth-aplicy/chat-ui 2.1.88 → 2.1.89

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubuduth-aplicy/chat-ui",
3
- "version": "2.1.88",
3
+ "version": "2.1.89",
4
4
  "description": "This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -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
 
@@ -106,7 +106,8 @@ const MessageInput = () => {
106
106
  data: {
107
107
  chatId: selectedConversation._id,
108
108
  userId,
109
- reciverId: otherParticipant?._id,
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
- reciverId: otherParticipant?._id,
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
  },
@@ -40,6 +40,7 @@ const Conversation = ({ conversation }: ConversationProps) => {
40
40
  senderId: participant?._id,
41
41
  receiverId: userId,
42
42
  receiverRole: role,
43
+ senderRole: role === "customer" ? "provider" : "customer",
43
44
  chatId: conversation._id,
44
45
  },
45
46
  };