whyuzeim 1.1.28 → 1.1.30
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.
|
@@ -39,9 +39,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
39
39
|
onLoginSuccess = props.onLoginSuccess;
|
|
40
40
|
var _useSDK = agoraChatUikit.useSDK(),
|
|
41
41
|
MessageSDK = _useSDK.ChatSDK;
|
|
42
|
-
var _useConversationConte = agoraChatUikit.useConversationContext(),
|
|
43
|
-
agoraCurrentConversation = _useConversationConte.currentConversation,
|
|
44
|
-
conversationList = _useConversationConte.conversationList;
|
|
45
42
|
var manulLoginRef = React.useRef(false);
|
|
46
43
|
var _useContext = React.useContext(context.Context),
|
|
47
44
|
http = _useContext.http,
|
|
@@ -453,8 +450,17 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
453
450
|
};
|
|
454
451
|
}();
|
|
455
452
|
React.useEffect(function () {
|
|
456
|
-
|
|
457
|
-
|
|
453
|
+
if (client) {
|
|
454
|
+
client.addEventHandler("handlerId", {
|
|
455
|
+
onChannelMessage: function onChannelMessage(message) {
|
|
456
|
+
console.log(_JSON$stringify(message), 'dfsfsd1');
|
|
457
|
+
},
|
|
458
|
+
onTextMessage: function onTextMessage(message) {
|
|
459
|
+
console.log(_JSON$stringify(message), 'dfsfsd2');
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
}, [client]);
|
|
458
464
|
return /*#__PURE__*/React.createElement("div", {
|
|
459
465
|
className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
|
|
460
466
|
}, loading ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -16,7 +16,7 @@ import _setInterval from '@babel/runtime-corejs3/core-js-stable/set-interval';
|
|
|
16
16
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
17
17
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
18
18
|
import React, { useRef, useContext, useState, useCallback, useEffect } from 'react';
|
|
19
|
-
import { useClient, useSDK,
|
|
19
|
+
import { useClient, useSDK, rootStore, MessageList, MessageInput, ImageMessage, FileMessage, VideoMessage, BaseMessage } from 'agora-chat-uikit';
|
|
20
20
|
import jsrsasign from 'jsrsasign';
|
|
21
21
|
import { Context } from '../IM/context.js';
|
|
22
22
|
import { commonMessageInputConfig, commonMessageProps } from '../type.js';
|
|
@@ -37,9 +37,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
37
37
|
onLoginSuccess = props.onLoginSuccess;
|
|
38
38
|
var _useSDK = useSDK(),
|
|
39
39
|
MessageSDK = _useSDK.ChatSDK;
|
|
40
|
-
var _useConversationConte = useConversationContext(),
|
|
41
|
-
agoraCurrentConversation = _useConversationConte.currentConversation,
|
|
42
|
-
conversationList = _useConversationConte.conversationList;
|
|
43
40
|
var manulLoginRef = useRef(false);
|
|
44
41
|
var _useContext = useContext(Context),
|
|
45
42
|
http = _useContext.http,
|
|
@@ -451,8 +448,17 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
451
448
|
};
|
|
452
449
|
}();
|
|
453
450
|
useEffect(function () {
|
|
454
|
-
|
|
455
|
-
|
|
451
|
+
if (client) {
|
|
452
|
+
client.addEventHandler("handlerId", {
|
|
453
|
+
onChannelMessage: function onChannelMessage(message) {
|
|
454
|
+
console.log(_JSON$stringify(message), 'dfsfsd1');
|
|
455
|
+
},
|
|
456
|
+
onTextMessage: function onTextMessage(message) {
|
|
457
|
+
console.log(_JSON$stringify(message), 'dfsfsd2');
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}, [client]);
|
|
456
462
|
return /*#__PURE__*/React.createElement("div", {
|
|
457
463
|
className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
|
|
458
464
|
}, loading ? /*#__PURE__*/React.createElement("div", {
|