@elqnt/chat 1.0.15 → 1.0.16
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/dist/hooks/use-websocket-chat-admin.js +8 -8
- package/dist/hooks/use-websocket-chat-admin.js.map +1 -1
- package/dist/hooks/use-websocket-chat-admin.mjs +8 -8
- package/dist/hooks/use-websocket-chat-admin.mjs.map +1 -1
- package/dist/hooks/use-websocket-chat-base.js +8 -8
- package/dist/hooks/use-websocket-chat-base.js.map +1 -1
- package/dist/hooks/use-websocket-chat-base.mjs +8 -8
- package/dist/hooks/use-websocket-chat-base.mjs.map +1 -1
- package/dist/hooks/use-websocket-chat-customer.js +8 -8
- package/dist/hooks/use-websocket-chat-customer.js.map +1 -1
- package/dist/hooks/use-websocket-chat-customer.mjs +8 -8
- package/dist/hooks/use-websocket-chat-customer.mjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -756,7 +756,7 @@ var useWebSocketChatBase = ({
|
|
|
756
756
|
await sendRestMessage("send", {
|
|
757
757
|
orgId: fullEvent.orgId || orgId,
|
|
758
758
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
759
|
-
userId: fullEvent.userId,
|
|
759
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
760
760
|
message: fullEvent.message
|
|
761
761
|
});
|
|
762
762
|
break;
|
|
@@ -764,7 +764,7 @@ var useWebSocketChatBase = ({
|
|
|
764
764
|
await sendRestMessage("typing", {
|
|
765
765
|
orgId: fullEvent.orgId || orgId,
|
|
766
766
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
767
|
-
userId: fullEvent.userId,
|
|
767
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
768
768
|
typing: true
|
|
769
769
|
});
|
|
770
770
|
break;
|
|
@@ -772,7 +772,7 @@ var useWebSocketChatBase = ({
|
|
|
772
772
|
await sendRestMessage("typing", {
|
|
773
773
|
orgId: fullEvent.orgId || orgId,
|
|
774
774
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
775
|
-
userId: fullEvent.userId,
|
|
775
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
776
776
|
typing: false
|
|
777
777
|
});
|
|
778
778
|
break;
|
|
@@ -780,7 +780,7 @@ var useWebSocketChatBase = ({
|
|
|
780
780
|
const loadResponse = await sendRestMessage("load", {
|
|
781
781
|
orgId: fullEvent.orgId || orgId,
|
|
782
782
|
chatKey: fullEvent.chatKey,
|
|
783
|
-
userId: fullEvent.userId
|
|
783
|
+
userId: fullEvent.userId || currentUserIdRef.current
|
|
784
784
|
});
|
|
785
785
|
if (loadResponse.success && loadResponse.data?.chat) {
|
|
786
786
|
currentChatKeyRef.current = loadResponse.data.chat.key;
|
|
@@ -801,7 +801,7 @@ var useWebSocketChatBase = ({
|
|
|
801
801
|
case "new_chat":
|
|
802
802
|
const createResponse = await sendRestMessage("create", {
|
|
803
803
|
orgId: fullEvent.orgId || orgId,
|
|
804
|
-
userId: fullEvent.userId,
|
|
804
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
805
805
|
metadata: fullEvent.data
|
|
806
806
|
});
|
|
807
807
|
if (createResponse.success && createResponse.data?.chatKey) {
|
|
@@ -828,7 +828,7 @@ var useWebSocketChatBase = ({
|
|
|
828
828
|
await sendRestMessage("end", {
|
|
829
829
|
orgId: fullEvent.orgId || orgId,
|
|
830
830
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
831
|
-
userId: fullEvent.userId,
|
|
831
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
832
832
|
data: fullEvent.data
|
|
833
833
|
});
|
|
834
834
|
break;
|
|
@@ -857,7 +857,7 @@ var useWebSocketChatBase = ({
|
|
|
857
857
|
type: fullEvent.type,
|
|
858
858
|
orgId: fullEvent.orgId || orgId,
|
|
859
859
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
860
|
-
userId: fullEvent.userId,
|
|
860
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
861
861
|
data: fullEvent.data
|
|
862
862
|
});
|
|
863
863
|
break;
|
|
@@ -867,7 +867,7 @@ var useWebSocketChatBase = ({
|
|
|
867
867
|
type: fullEvent.type,
|
|
868
868
|
orgId: fullEvent.orgId || orgId,
|
|
869
869
|
chatKey: fullEvent.chatKey || currentChatKeyRef.current,
|
|
870
|
-
userId: fullEvent.userId,
|
|
870
|
+
userId: fullEvent.userId || currentUserIdRef.current,
|
|
871
871
|
data: fullEvent.data
|
|
872
872
|
});
|
|
873
873
|
break;
|