whyuzeim 1.1.151 → 1.1.152
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/cjs/index.js +10 -8
- package/es/index.js +10 -8
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -138055,14 +138055,16 @@ var Chatbox = function Chatbox(props) {
|
|
|
138055
138055
|
isFree = _useState12[0],
|
|
138056
138056
|
setIsFree = _useState12[1];
|
|
138057
138057
|
React.useEffect(function () {
|
|
138058
|
-
|
|
138059
|
-
|
|
138060
|
-
|
|
138061
|
-
|
|
138062
|
-
|
|
138063
|
-
|
|
138064
|
-
|
|
138065
|
-
|
|
138058
|
+
if (currentConversation.chatType === 'singleChat') {
|
|
138059
|
+
http.post('/api/agora/validatePrivateChatToken', {
|
|
138060
|
+
targetWalletAddress: currentConversation.conversationId
|
|
138061
|
+
}).then(function (res) {
|
|
138062
|
+
if (res.data.code === 200) {
|
|
138063
|
+
setTokenInfo(res.data.data.tokenInfo);
|
|
138064
|
+
setIsFree(res.data.data.canChat);
|
|
138065
|
+
}
|
|
138066
|
+
});
|
|
138067
|
+
}
|
|
138066
138068
|
}, [currentConversation.conversationId]);
|
|
138067
138069
|
// useEffect(()=>{
|
|
138068
138070
|
// const cuiScrollList = document.querySelector(".cui-messageList .cui-scrollList div");
|
package/es/index.js
CHANGED
|
@@ -138034,14 +138034,16 @@ var Chatbox = function Chatbox(props) {
|
|
|
138034
138034
|
isFree = _useState12[0],
|
|
138035
138035
|
setIsFree = _useState12[1];
|
|
138036
138036
|
useEffect(function () {
|
|
138037
|
-
|
|
138038
|
-
|
|
138039
|
-
|
|
138040
|
-
|
|
138041
|
-
|
|
138042
|
-
|
|
138043
|
-
|
|
138044
|
-
|
|
138037
|
+
if (currentConversation.chatType === 'singleChat') {
|
|
138038
|
+
http.post('/api/agora/validatePrivateChatToken', {
|
|
138039
|
+
targetWalletAddress: currentConversation.conversationId
|
|
138040
|
+
}).then(function (res) {
|
|
138041
|
+
if (res.data.code === 200) {
|
|
138042
|
+
setTokenInfo(res.data.data.tokenInfo);
|
|
138043
|
+
setIsFree(res.data.data.canChat);
|
|
138044
|
+
}
|
|
138045
|
+
});
|
|
138046
|
+
}
|
|
138045
138047
|
}, [currentConversation.conversationId]);
|
|
138046
138048
|
// useEffect(()=>{
|
|
138047
138049
|
// const cuiScrollList = document.querySelector(".cui-messageList .cui-scrollList div");
|