whyuzeim 1.1.151 → 1.1.153

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 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
- http.post('/api/agora/validatePrivateChatToken', {
138059
- targetWalletAddress: currentConversation.conversationId
138060
- }).then(function (res) {
138061
- if (res.data.code === 200) {
138062
- setTokenInfo(res.data.data.tokenInfo);
138063
- setIsFree(res.data.data.canChat);
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
- http.post('/api/agora/validatePrivateChatToken', {
138038
- targetWalletAddress: currentConversation.conversationId
138039
- }).then(function (res) {
138040
- if (res.data.code === 200) {
138041
- setTokenInfo(res.data.data.tokenInfo);
138042
- setIsFree(res.data.data.canChat);
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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.151",
3
+ "version": "1.1.153",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",