@pubuduth-aplicy/chat-ui 2.1.86 → 2.1.87

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.86",
3
+ "version": "2.1.87",
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": "",
@@ -24,6 +24,7 @@ const MessageContainer = () => {
24
24
  data: {
25
25
  chatId: selectedConversation._id,
26
26
  userId: userId,
27
+ role: role,
27
28
  },
28
29
  })
29
30
  );
@@ -4,17 +4,19 @@ import { useEffect } from "react";
4
4
  import { useChatContext } from "../../providers/ChatProvider";
5
5
  import useChatUIStore from "../../stores/Zustant";
6
6
  import { ConversationProps } from "../../types/type";
7
+ import { getChatConfig } from "../../Chat.config";
7
8
 
8
9
  const Conversation = ({ conversation }: ConversationProps) => {
9
10
  const {
10
11
  setSelectedConversation,
11
12
  setOnlineUsers,
12
13
  } = useChatUIStore();
13
- const { socket, isUserOnline } = useChatContext();
14
+ const { socket, isUserOnline, } = useChatContext();
14
15
  const selectedConversation = useChatUIStore(
15
16
  (state) => state.selectedConversation
16
17
  );
17
18
  const { userId } = useChatContext();
19
+ const { role } = getChatConfig();
18
20
 
19
21
  const participant = conversation.participantDetails?.find(
20
22
  (p:any) => p._id !== userId
@@ -36,6 +38,7 @@ const Conversation = ({ conversation }: ConversationProps) => {
36
38
  messageIds: unreadMessageIds,
37
39
  senderId: participant?._id,
38
40
  receiverId: userId,
41
+ receiverRole: role,
39
42
  chatId: conversation._id,
40
43
  },
41
44
  };