diff --git a/CometChat.d.ts b/CometChat.d.ts index 21d7f03..9f8e683 100644 --- a/CometChat.d.ts +++ b/CometChat.d.ts @@ -222,6 +222,15 @@ export namespace CometChat { */ export function markAsDelivered(...args: any): void; + /** + * Send a transient message. + * + * @static + * @param {TransientMessage} transientMessage + * @memberof CometChat + */ + export function sendTransientMessage(transientMessage: TransientMessage | any): void; + /** * get the message Information with the help of message id * @@ -1604,6 +1613,7 @@ export namespace CometChat { onMessagesRead?: Function; onMessageEdited?: Function; onMessageDeleted?: Function; + onTransientMessageReceived?: Function; constructor(...args: any[]); } export class CallListener { @@ -2120,6 +2130,18 @@ export namespace CometChat { setSender(sender: User): void; } + export class TransientMessage { + constructor(receiverId: string, receiverType: string, data: any); + getReceiverId(): string; + setReceiverId(receiverId: string): void; + getReceiverType(): string; + setReceiverType(receiverType: string): void; + getData(): any; + setData(data: any): void; + getSender(): User; + setSender(sender: User): void; + } + export class CustomMessage extends BaseMessage implements Message { constructor(...args: any[]); getCustomData(): Object; diff --git a/CometChat.js b/CometChat.js index ce25150..daa9ffe 100644 --- a/CometChat.js +++ b/CometChat.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(){return function(n){var o={};function s(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}return s.m=n,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)s.d(n,o,function(e){return t[e]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=36)}([function(e,r,t){"use strict";r.__esModule=!0;var o=t(12),i=t(1),s=t(6),a=t(2),E=t(16),c=t(17),u=t(19),S=t(3),n=t(14);function l(e){return null!=e&&("string"==typeof e&&(e=e.trim()),"object"==typeof e&&0===Object.keys(e).length&&(e=void 0)),["",0,"0",!1,null,"null",void 0,"undefined"].includes(e)}function p(e){for(var o=[],t=1;ti[0]&&t[1] All store cleared successfully","true"),e(!0)})}catch(e){M.Logger.error("CometChat: clearCache",e),t(e)}})},L.prototype.restart=function(e){L.shouldPushLoginListener=!1,L.logout().then(function(){L.login(e).then(function(){L.shouldPushLoginListener=!0},function(){L.shouldPushLoginListener=!0})})},L.prototype.internalLogout=function(n){return void 0===n&&(n=!0),new Promise(function(e,t){try{L.didAnalyticsPingStart()&&L.clearAnalyticsPingTimer(),L.didMessagesPollingStart()&&L.clearMessagesTimer(),L.WSReconnectionInProgress&&L.clearWSReconnectionTimer(),L.isLoggedOut=!0,L.pollingMessagesId=0,L.pollingEnabled=!1,L.pollingInterval=5e3,L.pollingEnabledInternally=!1,L.WSReconnectionStartTime=0,L.WSReconnectionInProgress=!1,L.setLastMessageId(0),L.setAccidentalDisconnect(!1),L.isAnalyticsDisabled=!1,L.shouldFallBackToPolling=!0,L.clearCache().then(function(){L.apiKey=void 0,L.user=void 0,L.authToken=void 0,L.cometChat=void 0,L.mode=void 0,z.WSLogout(),n&&L.pushToLoginListener("","Logout_Success"),e(!0)})}catch(e){M.Logger.error("CometChat: internalLogout",e),t(e)}})},L.initialzed=!1,L.CometChatException=v.CometChatException,L.TextMessage=l.TextMessage,L.MediaMessage=S.MediaMessage,L.CustomMessage=G.CustomMessage,L.Action=i.Action,L.Call=s.Call,L.TypingIndicator=U.TypingIndicator,L.Group=h.Group,L.AppUser=T.User,L.User=T.User,L.GroupMember=w.GroupMember,L.Conversation=B.Conversation,L.USER_STATUS={ONLINE:P.PresenceConstatnts.STATUS.ONLINE,OFFLINE:P.PresenceConstatnts.STATUS.OFFLINE},L.MessagesRequest=m.DefaultMessagesRequest,L.MessagesRequestBuilder=m.DefaultMessagesRequestBuilder,L.UsersRequest=O.UsersRequest,L.UsersRequestBuilder=O.UsersRequestBuilder,L.ConversationsRequest=N.ConversationsRequest,L.ConversationsRequestBuilder=N.ConversationsRequestBuilder,L.BlockedUsersRequest=K.BlockedUsersRequest,L.BlockedUsersRequestBuilder=K.BlockedUsersRequestBuilder,L.GroupsRequest=f.GroupsRequest,L.GroupsRequestBuilder=f.GroupsRequestBuilder,L.GroupMembersRequest=R.GroupMembersRequest,L.GroupMembersRequestBuilder=R.GroupMembersRequestBuilder,L.BannedMembersRequest=R.GroupMembersRequest,L.BannedMembersRequestBuilder=R.GroupOutCastMembersRequestBuilder,L.CallSettings=J.CallSettings,L.CallSettingsBuilder=J.CallSettingsBuilder,L.AppSettings=b.AppSettings,L.AppSettingsBuilder=b.AppSettingsBuilder,L.MessageListener=o.MessageEventListener,L.UserListener=o.UserEventListener,L.GroupListener=o.GroupEventListener,L.OngoingCallListener=o.UserCallEventListener,L.CallListener=o.CallEventListener,L.ConnectionListener=o.ConnectionEventListener,L.LoginListener=o.LoginEventListener,L.CallController=D.CallController,L.CometChatHelper=F.CometChatHelper,L.Attachment=V.Attachment,L.MediaDevice=q.MediaDevice,L.MESSAGE_TYPE=P.MessageConstatnts.TYPE,L.CATEGORY_MESSAGE=P.MessageConstatnts.CATEGORY.MESSAGE,L.CATEGORY_ACTION=P.MessageConstatnts.CATEGORY.ACTION,L.CATEGORY_CALL=P.MessageConstatnts.CATEGORY.CALL,L.CATEGORY_CUSTOM=P.MessageConstatnts.CATEGORY.CUSTOM,L.ACTION_TYPE=P.ActionConstatnts.ACTIONS,L.CALL_TYPE=P.CallConstants.CALL_TYPE,L.RECEIVER_TYPE=P.MessageConstatnts.RECEIVER_TYPE,L.CALL_STATUS=P.CallConstants.CALL_STATUS,L.GROUP_MEMBER_SCOPE=P.GROUP_MEMBER_SCOPE,L.GROUP_TYPE=P.GROUP_TYPE,L.MESSAGE_REQUEST=P.MessageConstatnts.PAGINATION.CURSOR_FILEDS,L.CONNECTION_STATUS=P.CONNECTION_STATUS,L.CALL_MODE=P.CallConstants.CALL_MODE,L.WSReconnectionStartTime=0,L.WSMaxReconnectionLimit=10,L.WSCurrentReconnectionCount=0,L.WSReconnectionInProgress=!1,L.WSReconnectionPeriod=3e4,L.WSReconnectionTimerInterval=5e3,L.pollingEnabledInternally=!1,L.accidentalDisconnect=!1,L.successfulPingTimeStamp=0,L.currentConnectionStatus=P.CONNECTION_STATUS.DISCONNECTED,L.isWSCheckTimerStarted=!1,L.wsCheckTimerDuration=3e4,L.isConnectingFromInit=!1,L.loginInProgress=!1,L.lastMessageId=0,L.internalRestart=!1,L.pollingEnabled=!1,L.pollingInterval=5e3,L.pollingLimit=100,L.pollingAffix="append",L.pollingMessagesId=0,L.settingsInterval=6e4,L.isMessagesPollingStarted=!1,L.isAnalyticsPingStarted=!1,L.isLoggedOut=!0,L.isAnalyticsDisabled=!1,L.shouldFallBackToPolling=!0,L.shouldPushLoginListener=!0,L}();t.CometChat=$},function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var r=n(2),i=n(14),a=n(1),E=function(){function e(){for(var e=[],t=0;te.db.version;if(o&&(e.version,e.version=e.db.version),s||n){if(n){var r=e.db.version+1;r>e.version&&(e.version=r)}return!0}return!1}function N(e){var t=function(e){for(var t=e.length,n=new ArrayBuffer(t),o=new Uint8Array(n),s=0;s>4,u[E++]=(15&o)<<4|s>>2,u[E++]=(3&s)<<6|63&r;return c}function F(e){var t,n=new Uint8Array(e),o="";for(t=0;t>2],o+=v[(3&n[t])<<4|n[t+1]>>4],o+=v[(15&n[t+1])<<2|n[t+2]>>6],o+=v[63&n[t+2]];return n.length%3==2?o=o.substring(0,o.length-1)+"=":n.length%3==1&&(o=o.substring(0,o.length-2)+"=="),o}var B={serialize:function(t,n){var e="";if(t&&(e=K.call(t)),t&&("[object ArrayBuffer]"===e||t.buffer&&"[object ArrayBuffer]"===K.call(t.buffer))){var o,s=D;t instanceof ArrayBuffer?(o=t,s+=Y):(o=t.buffer,"[object Int8Array]"===e?s+="si08":"[object Uint8Array]"===e?s+="ui08":"[object Uint8ClampedArray]"===e?s+="uic8":"[object Int16Array]"===e?s+="si16":"[object Uint16Array]"===e?s+="ur16":"[object Int32Array]"===e?s+="si32":"[object Uint32Array]"===e?s+="ui32":"[object Float32Array]"===e?s+="fl32":"[object Float64Array]"===e?s+="fl64":n(new Error("Failed to get type for BinaryArray"))),n(s+F(o))}else if("[object Blob]"===e){var r=new FileReader;r.onload=function(){var e="~~local_forage_type~"+t.type+"~"+F(this.result);n(D+G+e)},r.readAsArrayBuffer(t)}else try{n(JSON.stringify(t))}catch(e){n(null,e)}},deserialize:function(e){if(e.substring(0,U)!==D)return JSON.parse(e);var t,n=e.substring(w),o=e.substring(U,w);if(o===G&&P.test(n)){var s=n.match(P);t=s[1],n=n.substring(s[0].length)}var r=b(n);switch(o){case Y:return r;case G:return i([r],{type:t});case"si08":return new Int8Array(r);case"ui08":return new Uint8Array(r);case"uic8":return new Uint8ClampedArray(r);case"si16":return new Int16Array(r);case"ur16":return new Uint16Array(r);case"si32":return new Int32Array(r);case"ui32":return new Uint32Array(r);case"fl32":return new Float32Array(r);case"fl64":return new Float64Array(r);default:throw new Error("Unkown type: "+o)}},stringToBuffer:b,bufferToString:F};function x(e,t,n,o){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,o)}function V(e,o,s,r,i,a){e.executeSql(s,r,i,function(e,n){n.code===n.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[o.storeName],function(e,t){t.rows.length?a(e,n):x(e,o,function(){e.executeSql(s,r,i,a)},a)},a):a(e,n)},a)}function J(i,e,a,E){var c=this;i=u(i);var t=new S(function(s,r){c.ready().then(function(){void 0===e&&(e=null);var n=e,o=c._dbInfo;o.serializer.serialize(e,function(t,e){e?r(e):o.db.transaction(function(e){V(e,o,"INSERT OR REPLACE INTO "+o.storeName+" (key, value) VALUES (?, ?)",[i,t],function(){s(n)},function(e,t){r(t)})},function(e){if(e.code===e.QUOTA_ERR){if(0 '__WebKitDatabaseInfoTable__'",[],function(e,t){for(var n=[],o=0;o"}},getFriends:{endpoint:"user/friends",method:"GET"},unfriend:{endpoint:"user/friends/{{uid}}/{{gid}}",method:"DELETE",data:{uids:"array"}},acceptFriendRequest:{endpoint:"user/friends/{{uid}}/accept",method:"PUT",data:{uids:"array"}},rejectFriendRequest:{endpoint:"user/friends/{{uid}}/reject",method:"DELETE",data:{uids:"array"}},createGroup:{endpoint:"groups",method:"POST",data:{guid:"required|string|max:100",name:"required|string|max:100",type:"enum|public,protected,password",password:"filled|string|max:100"}},getGroups:{endpoint:"groups",method:"GET"},getGroup:{endpoint:"groups/{{guid}}",method:"GET"},updateGroup:{endpoint:"groups/{{guid}}",method:"PUT"},deleteGroup:{endpoint:"groups/{{guid}}",method:"DELETE"},addGroupMembers:{endpoint:"groups/{{guid}}/members",method:"POST",data:{uids:"array"}},getGroupMembers:{endpoint:"groups/{{guid}}/members",method:"GET"},joinGroup:{endpoint:"groups/{{guid}}/members",method:"POST"},leaveGroup:{endpoint:"groups/{{guid}}/members",method:"DELETE"},kickGroupMembers:{endpoint:"groups/{{guid}}/members/{{uid}}",method:"DELETE",data:{uids:"array"}},changeScopeOfMember:{endpoint:"groups/{{guid}}/members/{{uid}}",method:"PUT",data:{uids:"array"}},banGroupMember:{endpoint:"groups/{{guid}}/bannedusers/{{uid}}",method:"POST",data:{uids:"array"}},unbanGroupMember:{endpoint:"groups/{{guid}}/bannedusers/{{uid}}",method:"DELETE",data:{uids:"array"}},addMemebersToGroup:{endpoint:"groups/{{guid}}/members",method:"PUT"},getBannedGroupMembers:{endpoint:"groups/{{guid}}/bannedusers",method:"GET"},promotemoteGroupMember:{endpoint:"groups/{{guid}}/promote",method:"PUT",data:{uids:"array"}},demoteGroupMember:{endpoint:"groups/{{guid}}/demote",method:"DELETE",data:{uids:"array"}},transferOwnership:{endpoint:"groups/{{guid}}/owner",method:"PATCH"},sendMessage:{endpoint:"messages",method:"POST",data:{sender:"array:string:max:100>",isGroupMember:"filled|boolean|bail",data:"required|json"}},sendMessageInThread:{endpoint:"messages/{{parentId}}/thread",method:"POST",data:{sender:"array:string:max:100>",isGroupMember:"filled|boolean|bail",data:"required|json"}},getMessages:{endpoint:"messages",method:"GET"},getMessageDetails:{endpoint:"messages/{{messageId}}",method:"GET"},getUserMessages:{endpoint:"users/{{listId}}/messages",method:"GET"},getGroupMessages:{endpoint:"groups/{{listId}}/messages",method:"GET"},getThreadMessages:{endpoint:"messages/{{listId}}/thread",method:"GET"},getMessage:{endpoint:"user/messages/{{muid}}",method:"GET"},updateMessage:{endpoint:"messages/{{messageId}}",method:"PUT"},deleteMessage:{endpoint:"messages/{{messageId}}",method:"DELETE"},createCallSession:{endpoint:"calls",method:"POST",data:{}},updateCallSession:{endpoint:"calls/{{sessionid}}",method:"put",data:{}},getConversations:{endpoint:"conversations",method:"GET"},getUserConversation:{endpoint:"users/{{uid}}/conversation",method:"GET"},getGroupConversation:{endpoint:"groups/{{guid}}/conversation",method:"GET"},deleteUserConversation:{endpoint:"users/{{uid}}/conversation",method:"DELETE"},deleteGroupConversation:{endpoint:"groups/{{guid}}/conversation",method:"DELETE"}}}return r.prototype.getEndpointData=function(s){return new Promise(function(o,t){try{E.LocalStorage.getInstance().get(a.LOCAL_STORE.KEY_APP_SETTINGS).then(function(e){if(i.isFalsy(e)){var t={};if((new r).uriEndpoints.hasOwnProperty(s))if((t=(new r).uriEndpoints[s]).hasOwnProperty("isAdminApi")){var n=i.format((new r).adminApiUrl,c.CometChat.appSettings.getRegion())+(new r).adminApiVersion+"/"+t.endpoint;t.endpoint=n}else{n=i.format((new r).baseUrl,c.CometChat.appSettings.getRegion())+(new r).apiVersion+"/"+t.endpoint;t.endpoint=n}o(t)}else{t={};if((new r).uriEndpoints.hasOwnProperty(s))if((t=(new r).uriEndpoints[s]).hasOwnProperty("isAdminApi"))t.endpoint="https://"+e[a.APP_SETTINGS.KEYS.ADMIN_API_HOST]+"/"+(new r).adminApiVersion+"/"+t.endpoint;else{n="https://"+e[a.APP_SETTINGS.KEYS.CLIENT_API_HOST]+"/"+(new r).apiVersion+"/"+t.endpoint;t.endpoint=n}o(t)}},function(e){var t;(new r).uriEndpoints.hasOwnProperty(s)&&((t=(new r).uriEndpoints[s]).hasOwnProperty(["isAdminApi"])?t.endpoint=i.format((new r).adminApiUrl,c.CometChat.appSettings.getRegion())+(new r).adminApiVersion+"/"+t.endpoint:t.endpoint=i.format((new r).baseUrl,c.CometChat.appSettings.getRegion())+(new r).apiVersion+"/"+t.endpoint),o(t)})}catch(e){t(new u.CometChatException(e))}})},r}();t.EndpointFactory=o},function(e,t,n){"use strict";t.__esModule=!0;var o=n(26),i=n(2);t.getEndPoint=function(e,r){void 0===e&&(e=""),void 0===r&&(r={});var t=new o.EndpointFactory;return new Promise(function(o,s){try{t.getEndpointData(e).then(function(e){var t=e;if(t){for(var n in r)t.endpoint=t.endpoint.replace("{{"+n+"}}",r[n]);o(t)}else s({error:"Unknown endPoint name."})})}catch(e){s(new i.CometChatException(e))}})}},function(e,t,n){"use strict";t.__esModule=!0;var S=n(1),l=n(0),p=n(3),s=n(2),o=n(23),r=n(12),i=n(29),C=n(4),a=function(){function u(){this.TAG="calling Log",this.CALL_NO_ANSWER_INTERVAL=45e3,this.view=void 0,this.isDev=!1}return u.prototype.getCallListner=function(){return u.callListner},u.prototype.setCallListner=function(e){u.callListner=new o.UserCallListener(e)},u.getInstance=function(){try{return null!=this.callController&&null!=this.callController||(this.callController=new u),this.callController}catch(e){l.Logger.error("CallController: getInstance",e)}},u.prototype.getActiveCall=function(){try{return l.isFalsy(this.call)?null:this.call}catch(e){l.Logger.error("CallController: getActiveCall",e)}},u.prototype.initiateCall=function(n){var o=this;return new Promise(function(e,t){try{l.isFalsy(o.call)?null!=n&&null!=n?(o.call=n,o.startCallTimer(),e(n)):t(new s.CometChatException(S.CALL_ERROR.ERROR_IN_CALLING)):t(new s.CometChatException(S.CALL_ERROR.CALL_ALREADY_INITIATED))}catch(e){t(new s.CometChatException(e))}})},u.prototype.endCall=function(e){var t=this;try{document.getElementsByName("frame").forEach(function(e){t.view&&(t.view.removeChild(e),t.view=void 0)}),this.endCallSession()}catch(e){l.Logger.error("CallController: endCall",e)}},u.prototype.onCallStarted=function(n){var o=this;return new Promise(function(e,t){try{l.isFalsy(o.call)?null!=n&&null!=n?e(o.call=n):t(new s.CometChatException(S.CALL_ERROR.ERROR_IN_CALLING)):t(new s.CometChatException(S.CALL_ERROR.CALL_ALREADY_INITIATED))}catch(e){t(new s.CometChatException(e))}})},u.prototype.endCallSession=function(){try{this.call=void 0,u.callController=void 0,this.timer&&this.stopCallTimer(),this.view=void 0,this.removeListener(),u.callScreen=null,u.callSettings=null}catch(e){l.Logger.error("CallController:EndCallSession",{e:e})}},u.prototype.startCallTimer=function(){var t=this;try{this.timer=setTimeout(function(){t.call?p.CometChat.sendUnansweredResponse(t.call.getSessionId()).then(function(e){t.endCallSession()},function(e){t.endCallSession()}):t.endCallSession()},this.CALL_NO_ANSWER_INTERVAL)}catch(e){l.Logger.error("CallController: startCallTimer",e)}},u.prototype.stopCallTimer=function(){try{clearTimeout(this.timer)}catch(e){l.Logger.error("CallController: stopCallTimer",e)}},u.prototype.startCall=function(t,n){var o=this;try{this.timer&&this.stopCallTimer();var s=document.createElement("iframe");this.getCallUrl().then(function(e){s.src=e+"",s.name="frame",s.setAttribute("allow","camera; microphone; display-capture;"),s.setAttribute("width","100%"),s.setAttribute("height","100%"),u.callScreen=s,u.callSettings=t,n&&(o.view=n),n.appendChild(s),o.addListener()})}catch(e){l.Logger.error("CallController: startCall",e)}},u.prototype.addListener=function(){window.addEventListener("message",this.handler,!0)},u.prototype.removeListener=function(){window.removeEventListener("message",this.handler,!0)},u.prototype.handler=function(e){var t,n=this,o=u.callSettings,s=u.callScreen,r=u.getInstance().getActiveCall();try{if(void 0!==(t=JSON.parse(e.data))&&t.type==S.CallConstants.POST_MESSAGES.TYPES.HANGUP)u.deviceList=null,r?(l.Logger.info(this.TAG,u.callListner),window.setTimeout(function(){p.CometChat.endCall(r.getSessionId(),!0).then(function(e){l.Logger.info(n.TAG,{call:e})}).catch(function(e){l.Logger.info(n.TAG,"The Call Was Already Ended")})},1e3)):p.CometChat.endCall(o.getSessionId(),!0).then(function(e){l.Logger.info(n.TAG,{call:e})}).catch(function(e){l.Logger.info(n.TAG,"The Call Was Already Ended")});else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_JOINED){if(t.value){var i=void 0,a=t.value;l.isFalsy(a.uid)||l.isFalsy(a.name)||((i=new C.User(a)).setStatus("online"),p.CometChat.user.getUid().toLowerCase()!=i.getUid().toLowerCase()&&u.callListner&&(l.isFalsy(u.callListner._eventListener.onUserJoined)||u.callListner._eventListener.onUserJoined(i)))}}else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_LEFT){if(t.value){i=void 0,a=t.value;l.isFalsy(a.uid)||l.isFalsy(a.name)||((i=new C.User(a)).setStatus("online"),p.CometChat.user.getUid().toLowerCase()!=i.getUid().toLowerCase()&&u.callListner&&(l.isFalsy(u.callListner._eventListener.onUserLeft)||u.callListner._eventListener.onUserLeft(i)))}}else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_LIST_CHANGED){var E=[];if(t.value&&0a.DEFAULT_VALUES.GROUPS_MAX_LIMIT)return new r.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.GROUPS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0u.DEFAULT_VALUES.USERS_MAX_LIMIT)return new E.CometChatException(JSON.parse(i.format(JSON.stringify(u.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",u.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0c.DEFAULT_VALUES.USERS_MAX_LIMIT)return new a.CometChatException(JSON.parse(o.format(JSON.stringify(c.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",c.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},s.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0a.DEFAULT_VALUES.CONVERSATION_MAX_LIMIT?new r.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.CONVERSATION_MAX_LIMIT))):this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e}();t.ConversationsRequest=E;var c=function(){function e(){}return e.prototype.setLimit=function(e){return this.limit=e,this},e.prototype.setConversationType=function(e){return this.conversationType=e,this},e.prototype.build=function(){return new E(this)},e}();t.ConversationsRequestBuilder=c},function(e,t,n){"use strict";var g=this&&this.__awaiter||function(r,i,a,E){return new(a||(a=Promise))(function(e,t){function n(e){try{s(E.next(e))}catch(e){t(e)}}function o(e){try{s(E.throw(e))}catch(e){t(e)}}function s(t){t.done?e(t.value):new a(function(e){e(t.value)}).then(n,o)}s((E=E.apply(r,i||[])).next())})},_=this&&this.__generator||function(n,o){var s,r,i,e,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,r&&(i=2&t[0]?r.return:t[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,t[1])).done)return i;switch(r=0,i&&(t=[2&t[0],i.value]),t[0]){case 0:case 1:i=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,r=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(i=0<(i=a.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]R.DEFAULT_VALUES.MSGS_MAX_LIMIT)return void t(new h.CometChatException(JSON.parse(f.format(JSON.stringify(R.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",R.DEFAULT_VALUES.MSGS_MAX_LIMIT))));if(se&&N.MessageListnerMaping.getInstance().set(R.LOCAL_STORE.KEY_MESSAGE_LISTENER_LIST,parseInt(t.id))},function(e){N.MessageListnerMaping.getInstance().set(R.LOCAL_STORE.KEY_MESSAGE_LISTENER_LIST,parseInt(t.id))}),i.affix==R.MessageConstatnts.PAGINATION.AFFIX.APPEND?(i.idparseInt(t.id)&&(i.id=parseInt(t.id)),i.timestamp>t.sentAt&&(i.timestamp=t.sentAt),i.updatedAt>t.updatedAt&&(i.updatedAt=t.updatedAt)),i.id&&(i.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.ID]=i.id),i.timestamp&&(i.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.SENT_AT]=i.timestamp),i.updatedAt&&(i.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.UPDATED_AT]=i.updatedAt),o.push(I.MessageController.trasformJSONMessge(t))}),[3,3];case 2:o=[],e.label=3;case 3:return E(o),[2]}})})},function(e){t(new h.CometChatException(e.error))})}catch(e){t(new h.CometChatException(e))}})},e.prototype.createEndpoint=function(){this.parentMessageId?(this.endpointName="getThreadMessages",this.listId=this.parentMessageId.toString(),this.hideReplies&&(this.hideReplies=!1,delete this.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.HIDE_REPLIES])):(f.isFalsy(this.guid)||f.isFalsy(this.uid))&&f.isFalsy(this.guid)?(f.isFalsy(this.uid)?this.endpointName="getMessages":this.endpointName="getUserMessages",this.listId=this.uid):(this.endpointName="getGroupMessages",this.listId=this.guid)},e.prototype.makeData=function(){var e={};e[R.MessageConstatnts.PAGINATION.KEYS.PER_PAGE]=this.limit,e[R.MessageConstatnts.PAGINATION.KEYS.AFFIX]=this.affix,(f.isFalsy(this.guid)||f.isFalsy(this.uid))&&f.isFalsy(this.guid)&&f.isFalsy(this.uid)},e.prototype.getFilteredPreviousDataByReceiverId=function(t){return g(this,void 0,void 0,function(){var n,o=this;return _(this,function(e){switch(e.label){case 0:switch(n=[],t){case"user":return[3,1];case"group":return[3,3];case"both":return[3,5]}return[3,7];case 1:return[4,s.MessagesStore.getInstance().get(this.uid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 2:return e.sent(),[3,9];case 3:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 4:e.sent(),e.label=5;case 5:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).filter(function(e){return t[e].sender.uid==o.uid}).map(function(e){n=n.concat([t[e]])})})];case 6:return e.sent(),[3,9];case 7:return[4,s.MessagesStore.getInstance().getAllMessages().then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 8:return e.sent(),[3,9];case 9:return[2,n]}})})},e.prototype.getFilteredNextDataByReceiverId=function(t){return g(this,void 0,void 0,function(){var n,o=this;return _(this,function(e){switch(e.label){case 0:switch(n=[],t){case"user":return[3,1];case"group":return[3,3];case"both":return[3,5]}return[3,7];case 1:return[4,s.MessagesStore.getInstance().get(this.uid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 2:return e.sent(),[3,9];case 3:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 4:e.sent(),e.label=5;case 5:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).filter(function(e){return t[e].sender.uid==o.uid}).map(function(e){n=n.concat([t[e]])})})];case 6:return e.sent(),[3,9];case 7:return[4,s.MessagesStore.getInstance().getAllMessages().then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 8:return e.sent(),[3,9];case 9:return[2,n]}})})},e}();t.DefaultMessagesRequest=o;var r=function(){function e(){this.maxLimit=R.DEFAULT_VALUES.MSGS_MAX_LIMIT,this.timestamp=0,this.id=R.DEFAULT_VALUES.DEFAULT_MSG_ID,this.unread=!1,this.HideMessagesFromBlockedUsers=!1,this.onlyUpdate=0,this.HideDeletedMessages=!1}return e.prototype.setLimit=function(e){return this.limit=e,this},e.prototype.setGUID=function(e){return this.guid=e,this},e.prototype.setUID=function(e){return this.uid=e,this},e.prototype.setParentMessageId=function(e){return this.parentMessageId=e,this},e.prototype.setTimestamp=function(e){return void 0===e&&(e=f.getCurrentTime()),this.timestamp=e,this},e.prototype.setMessageId=function(e){return void 0===e&&(e=R.DEFAULT_VALUES.DEFAULT_MSG_ID),this.id=e,this},e.prototype.setUnread=function(e){return void 0===e&&(e=!1),this.unread=e,this},e.prototype.hideMessagesFromBlockedUsers=function(e){return void 0===e&&(e=!1),this.HideMessagesFromBlockedUsers=e,this},e.prototype.setSearchKeyword=function(e){return this.searchKey=e,this},e.prototype.setUpdatedAfter=function(e){return this.updatedAt=e,this},e.prototype.updatesOnly=function(e){return e&&(this.onlyUpdate=1),this},e.prototype.setCategory=function(e){return this.category=e,this},e.prototype.setCategories=function(e){return this.categories=e,this},e.prototype.setType=function(e){return this.type=e,this},e.prototype.setTypes=function(e){return this.types=e,this},e.prototype.hideReplies=function(e){return this.HideReplies=e,this},e.prototype.hideDeletedMessages=function(e){return this.HideDeletedMessages=e,this},e.prototype.build=function(){return this.category&&this.categories&&this.categories.push(this.category),this.type&&this.types&&this.types.push(this.type),new o(this)},e}();t.DefaultMessagesRequestBuilder=r},function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;ne.getId()&&(i=parseInt(e.getId().toString())),oa.DEFAULT_VALUES.USERS_MAX_LIMIT)return new i.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0>>((3&t)<<3)&255;return s}}},function(e,t){for(var s=[],n=0;n<256;++n)s[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=s;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}}])}); \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(){return function(n){var o={};function s(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}return s.m=n,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)s.d(n,o,function(e){return t[e]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=36)}([function(e,r,t){"use strict";r.__esModule=!0;var o=t(12),i=t(1),s=t(6),a=t(2),E=t(16),c=t(17),u=t(19),S=t(3),n=t(14);function l(e){return null!=e&&("string"==typeof e&&(e=e.trim()),"object"==typeof e&&0===Object.keys(e).length&&(e=void 0)),["",0,"0",!1,null,"null",void 0,"undefined"].includes(e)}function p(e){for(var o=[],t=1;ti[0]&&t[1] All store cleared successfully","true"),e(!0)})}catch(e){M.Logger.error("CometChat: clearCache",e),t(e)}})},L.prototype.restart=function(e){L.shouldPushLoginListener=!1,L.logout().then(function(){L.login(e).then(function(){L.shouldPushLoginListener=!0},function(){L.shouldPushLoginListener=!0})})},L.prototype.internalLogout=function(n){return void 0===n&&(n=!0),new Promise(function(e,t){try{L.didAnalyticsPingStart()&&L.clearAnalyticsPingTimer(),L.didMessagesPollingStart()&&L.clearMessagesTimer(),L.WSReconnectionInProgress&&L.clearWSReconnectionTimer(),L.isLoggedOut=!0,L.pollingMessagesId=0,L.pollingEnabled=!1,L.pollingInterval=5e3,L.pollingEnabledInternally=!1,L.WSReconnectionStartTime=0,L.WSReconnectionInProgress=!1,L.setLastMessageId(0),L.setAccidentalDisconnect(!1),L.isAnalyticsDisabled=!1,L.shouldFallBackToPolling=!0,L.clearCache().then(function(){L.apiKey=void 0,L.user=void 0,L.authToken=void 0,L.cometChat=void 0,L.mode=void 0,Z.WSLogout(),n&&L.pushToLoginListener("","Logout_Success"),e(!0)})}catch(e){M.Logger.error("CometChat: internalLogout",e),t(e)}})},L.initialzed=!1,L.CometChatException=v.CometChatException,L.TextMessage=d.TextMessage,L.MediaMessage=S.MediaMessage,L.CustomMessage=G.CustomMessage,L.Action=i.Action,L.Call=s.Call,L.TypingIndicator=U.TypingIndicator,L.TransientMessage=Q.TransientMessage,L.Group=a.Group,L.AppUser=T.User,L.User=T.User,L.GroupMember=w.GroupMember,L.Conversation=B.Conversation,L.USER_STATUS={ONLINE:P.PresenceConstatnts.STATUS.ONLINE,OFFLINE:P.PresenceConstatnts.STATUS.OFFLINE},L.MessagesRequest=m.DefaultMessagesRequest,L.MessagesRequestBuilder=m.DefaultMessagesRequestBuilder,L.UsersRequest=O.UsersRequest,L.UsersRequestBuilder=O.UsersRequestBuilder,L.ConversationsRequest=N.ConversationsRequest,L.ConversationsRequestBuilder=N.ConversationsRequestBuilder,L.BlockedUsersRequest=K.BlockedUsersRequest,L.BlockedUsersRequestBuilder=K.BlockedUsersRequestBuilder,L.GroupsRequest=f.GroupsRequest,L.GroupsRequestBuilder=f.GroupsRequestBuilder,L.GroupMembersRequest=R.GroupMembersRequest,L.GroupMembersRequestBuilder=R.GroupMembersRequestBuilder,L.BannedMembersRequest=R.GroupMembersRequest,L.BannedMembersRequestBuilder=R.GroupOutCastMembersRequestBuilder,L.CallSettings=J.CallSettings,L.CallSettingsBuilder=J.CallSettingsBuilder,L.AppSettings=b.AppSettings,L.AppSettingsBuilder=b.AppSettingsBuilder,L.MessageListener=o.MessageEventListener,L.UserListener=o.UserEventListener,L.GroupListener=o.GroupEventListener,L.OngoingCallListener=o.UserCallEventListener,L.CallListener=o.CallEventListener,L.ConnectionListener=o.ConnectionEventListener,L.LoginListener=o.LoginEventListener,L.CallController=D.CallController,L.CometChatHelper=F.CometChatHelper,L.Attachment=V.Attachment,L.MediaDevice=q.MediaDevice,L.MESSAGE_TYPE=P.MessageConstatnts.TYPE,L.CATEGORY_MESSAGE=P.MessageConstatnts.CATEGORY.MESSAGE,L.CATEGORY_ACTION=P.MessageConstatnts.CATEGORY.ACTION,L.CATEGORY_CALL=P.MessageConstatnts.CATEGORY.CALL,L.CATEGORY_CUSTOM=P.MessageConstatnts.CATEGORY.CUSTOM,L.ACTION_TYPE=P.ActionConstatnts.ACTIONS,L.CALL_TYPE=P.CallConstants.CALL_TYPE,L.RECEIVER_TYPE=P.MessageConstatnts.RECEIVER_TYPE,L.CALL_STATUS=P.CallConstants.CALL_STATUS,L.GROUP_MEMBER_SCOPE=P.GROUP_MEMBER_SCOPE,L.GROUP_TYPE=P.GROUP_TYPE,L.MESSAGE_REQUEST=P.MessageConstatnts.PAGINATION.CURSOR_FILEDS,L.CONNECTION_STATUS=P.CONNECTION_STATUS,L.CALL_MODE=P.CallConstants.CALL_MODE,L.WSReconnectionStartTime=0,L.WSMaxReconnectionLimit=10,L.WSCurrentReconnectionCount=0,L.WSReconnectionInProgress=!1,L.WSReconnectionPeriod=3e4,L.WSReconnectionTimerInterval=5e3,L.pollingEnabledInternally=!1,L.accidentalDisconnect=!1,L.successfulPingTimeStamp=0,L.currentConnectionStatus=P.CONNECTION_STATUS.DISCONNECTED,L.isWSCheckTimerStarted=!1,L.wsCheckTimerDuration=3e4,L.isConnectingFromInit=!1,L.loginInProgress=!1,L.lastMessageId=0,L.internalRestart=!1,L.pollingEnabled=!1,L.pollingInterval=5e3,L.pollingLimit=100,L.pollingAffix="append",L.pollingMessagesId=0,L.settingsInterval=6e4,L.isMessagesPollingStarted=!1,L.isAnalyticsPingStarted=!1,L.isLoggedOut=!0,L.isAnalyticsDisabled=!1,L.shouldFallBackToPolling=!0,L.shouldPushLoginListener=!0,L}();t.CometChat=ee},function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var r=n(2),i=n(14),a=n(1),E=function(){function e(){for(var e=[],t=0;te.db.version;if(o&&(e.version,e.version=e.db.version),s||n){if(n){var r=e.db.version+1;r>e.version&&(e.version=r)}return!0}return!1}function N(e){var t=function(e){for(var t=e.length,n=new ArrayBuffer(t),o=new Uint8Array(n),s=0;s>4,u[E++]=(15&o)<<4|s>>2,u[E++]=(3&s)<<6|63&r;return c}function F(e){var t,n=new Uint8Array(e),o="";for(t=0;t>2],o+=v[(3&n[t])<<4|n[t+1]>>4],o+=v[(15&n[t+1])<<2|n[t+2]>>6],o+=v[63&n[t+2]];return n.length%3==2?o=o.substring(0,o.length-1)+"=":n.length%3==1&&(o=o.substring(0,o.length-2)+"=="),o}var B={serialize:function(t,n){var e="";if(t&&(e=K.call(t)),t&&("[object ArrayBuffer]"===e||t.buffer&&"[object ArrayBuffer]"===K.call(t.buffer))){var o,s=D;t instanceof ArrayBuffer?(o=t,s+=Y):(o=t.buffer,"[object Int8Array]"===e?s+="si08":"[object Uint8Array]"===e?s+="ui08":"[object Uint8ClampedArray]"===e?s+="uic8":"[object Int16Array]"===e?s+="si16":"[object Uint16Array]"===e?s+="ur16":"[object Int32Array]"===e?s+="si32":"[object Uint32Array]"===e?s+="ui32":"[object Float32Array]"===e?s+="fl32":"[object Float64Array]"===e?s+="fl64":n(new Error("Failed to get type for BinaryArray"))),n(s+F(o))}else if("[object Blob]"===e){var r=new FileReader;r.onload=function(){var e="~~local_forage_type~"+t.type+"~"+F(this.result);n(D+G+e)},r.readAsArrayBuffer(t)}else try{n(JSON.stringify(t))}catch(e){n(null,e)}},deserialize:function(e){if(e.substring(0,U)!==D)return JSON.parse(e);var t,n=e.substring(w),o=e.substring(U,w);if(o===G&&P.test(n)){var s=n.match(P);t=s[1],n=n.substring(s[0].length)}var r=b(n);switch(o){case Y:return r;case G:return i([r],{type:t});case"si08":return new Int8Array(r);case"ui08":return new Uint8Array(r);case"uic8":return new Uint8ClampedArray(r);case"si16":return new Int16Array(r);case"ur16":return new Uint16Array(r);case"si32":return new Int32Array(r);case"ui32":return new Uint32Array(r);case"fl32":return new Float32Array(r);case"fl64":return new Float64Array(r);default:throw new Error("Unkown type: "+o)}},stringToBuffer:b,bufferToString:F};function x(e,t,n,o){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,o)}function V(e,o,s,r,i,a){e.executeSql(s,r,i,function(e,n){n.code===n.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[o.storeName],function(e,t){t.rows.length?a(e,n):x(e,o,function(){e.executeSql(s,r,i,a)},a)},a):a(e,n)},a)}function J(i,e,a,E){var c=this;i=u(i);var t=new S(function(s,r){c.ready().then(function(){void 0===e&&(e=null);var n=e,o=c._dbInfo;o.serializer.serialize(e,function(t,e){e?r(e):o.db.transaction(function(e){V(e,o,"INSERT OR REPLACE INTO "+o.storeName+" (key, value) VALUES (?, ?)",[i,t],function(){s(n)},function(e,t){r(t)})},function(e){if(e.code===e.QUOTA_ERR){if(0 '__WebKitDatabaseInfoTable__'",[],function(e,t){for(var n=[],o=0;o"}},getFriends:{endpoint:"user/friends",method:"GET"},unfriend:{endpoint:"user/friends/{{uid}}/{{gid}}",method:"DELETE",data:{uids:"array"}},acceptFriendRequest:{endpoint:"user/friends/{{uid}}/accept",method:"PUT",data:{uids:"array"}},rejectFriendRequest:{endpoint:"user/friends/{{uid}}/reject",method:"DELETE",data:{uids:"array"}},createGroup:{endpoint:"groups",method:"POST",data:{guid:"required|string|max:100",name:"required|string|max:100",type:"enum|public,protected,password",password:"filled|string|max:100"}},getGroups:{endpoint:"groups",method:"GET"},getGroup:{endpoint:"groups/{{guid}}",method:"GET"},updateGroup:{endpoint:"groups/{{guid}}",method:"PUT"},deleteGroup:{endpoint:"groups/{{guid}}",method:"DELETE"},addGroupMembers:{endpoint:"groups/{{guid}}/members",method:"POST",data:{uids:"array"}},getGroupMembers:{endpoint:"groups/{{guid}}/members",method:"GET"},joinGroup:{endpoint:"groups/{{guid}}/members",method:"POST"},leaveGroup:{endpoint:"groups/{{guid}}/members",method:"DELETE"},kickGroupMembers:{endpoint:"groups/{{guid}}/members/{{uid}}",method:"DELETE",data:{uids:"array"}},changeScopeOfMember:{endpoint:"groups/{{guid}}/members/{{uid}}",method:"PUT",data:{uids:"array"}},banGroupMember:{endpoint:"groups/{{guid}}/bannedusers/{{uid}}",method:"POST",data:{uids:"array"}},unbanGroupMember:{endpoint:"groups/{{guid}}/bannedusers/{{uid}}",method:"DELETE",data:{uids:"array"}},addMemebersToGroup:{endpoint:"groups/{{guid}}/members",method:"PUT"},getBannedGroupMembers:{endpoint:"groups/{{guid}}/bannedusers",method:"GET"},promotemoteGroupMember:{endpoint:"groups/{{guid}}/promote",method:"PUT",data:{uids:"array"}},demoteGroupMember:{endpoint:"groups/{{guid}}/demote",method:"DELETE",data:{uids:"array"}},transferOwnership:{endpoint:"groups/{{guid}}/owner",method:"PATCH"},sendMessage:{endpoint:"messages",method:"POST",data:{sender:"array:string:max:100>",isGroupMember:"filled|boolean|bail",data:"required|json"}},sendMessageInThread:{endpoint:"messages/{{parentId}}/thread",method:"POST",data:{sender:"array:string:max:100>",isGroupMember:"filled|boolean|bail",data:"required|json"}},getMessages:{endpoint:"messages",method:"GET"},getMessageDetails:{endpoint:"messages/{{messageId}}",method:"GET"},getUserMessages:{endpoint:"users/{{listId}}/messages",method:"GET"},getGroupMessages:{endpoint:"groups/{{listId}}/messages",method:"GET"},getThreadMessages:{endpoint:"messages/{{listId}}/thread",method:"GET"},getMessage:{endpoint:"user/messages/{{muid}}",method:"GET"},updateMessage:{endpoint:"messages/{{messageId}}",method:"PUT"},deleteMessage:{endpoint:"messages/{{messageId}}",method:"DELETE"},createCallSession:{endpoint:"calls",method:"POST",data:{}},updateCallSession:{endpoint:"calls/{{sessionid}}",method:"put",data:{}},getConversations:{endpoint:"conversations",method:"GET"},getUserConversation:{endpoint:"users/{{uid}}/conversation",method:"GET"},getGroupConversation:{endpoint:"groups/{{guid}}/conversation",method:"GET"},deleteUserConversation:{endpoint:"users/{{uid}}/conversation",method:"DELETE"},deleteGroupConversation:{endpoint:"groups/{{guid}}/conversation",method:"DELETE"}}}return r.prototype.getEndpointData=function(s){return new Promise(function(o,t){try{E.LocalStorage.getInstance().get(a.LOCAL_STORE.KEY_APP_SETTINGS).then(function(e){if(i.isFalsy(e)){var t={};if((new r).uriEndpoints.hasOwnProperty(s))if((t=(new r).uriEndpoints[s]).hasOwnProperty("isAdminApi")){var n=i.format((new r).adminApiUrl,c.CometChat.getAppId(),c.CometChat.appSettings.getRegion())+(new r).adminApiVersion+"/"+t.endpoint;t.endpoint=n}else{n=i.format((new r).baseUrl,c.CometChat.getAppId(),c.CometChat.appSettings.getRegion())+(new r).apiVersion+"/"+t.endpoint;t.endpoint=n}o(t)}else{t={};if((new r).uriEndpoints.hasOwnProperty(s))if((t=(new r).uriEndpoints[s]).hasOwnProperty("isAdminApi"))t.endpoint="https://"+e[a.APP_SETTINGS.KEYS.ADMIN_API_HOST]+"/"+(new r).adminApiVersion+"/"+t.endpoint;else{n="https://"+e[a.APP_SETTINGS.KEYS.CLIENT_API_HOST]+"/"+(new r).apiVersion+"/"+t.endpoint;t.endpoint=n}o(t)}},function(e){var t;(new r).uriEndpoints.hasOwnProperty(s)&&((t=(new r).uriEndpoints[s]).hasOwnProperty(["isAdminApi"])?t.endpoint=i.format((new r).adminApiUrl,c.CometChat.getAppId(),c.CometChat.appSettings.getRegion())+(new r).adminApiVersion+"/"+t.endpoint:t.endpoint=i.format((new r).baseUrl,c.CometChat.getAppId(),c.CometChat.appSettings.getRegion())+(new r).apiVersion+"/"+t.endpoint),o(t)})}catch(e){t(new u.CometChatException(e))}})},r}();t.EndpointFactory=o},function(e,t,n){"use strict";t.__esModule=!0;var o=n(27),i=n(2);t.getEndPoint=function(e,r){void 0===e&&(e=""),void 0===r&&(r={});var t=new o.EndpointFactory;return new Promise(function(o,s){try{t.getEndpointData(e).then(function(e){var t=e;if(t){for(var n in r)t.endpoint=t.endpoint.replace("{{"+n+"}}",r[n]);o(t)}else s({error:"Unknown endPoint name."})})}catch(e){s(new i.CometChatException(e))}})}},function(e,t,n){"use strict";t.__esModule=!0;var S=n(1),l=n(0),p=n(3),s=n(2),o=n(23),r=n(12),i=n(30),C=n(4),a=function(){function u(){this.TAG="calling Log",this.CALL_NO_ANSWER_INTERVAL=45e3,this.view=void 0,this.isDev=!1}return u.prototype.getCallListner=function(){return u.callListner},u.prototype.setCallListner=function(e){u.callListner=new o.UserCallListener(e)},u.getInstance=function(){try{return null!=this.callController&&null!=this.callController||(this.callController=new u),this.callController}catch(e){l.Logger.error("CallController: getInstance",e)}},u.prototype.getActiveCall=function(){try{return l.isFalsy(this.call)?null:this.call}catch(e){l.Logger.error("CallController: getActiveCall",e)}},u.prototype.initiateCall=function(n){var o=this;return new Promise(function(e,t){try{l.isFalsy(o.call)?null!=n&&null!=n?(o.call=n,o.startCallTimer(),e(n)):t(new s.CometChatException(S.CALL_ERROR.ERROR_IN_CALLING)):t(new s.CometChatException(S.CALL_ERROR.CALL_ALREADY_INITIATED))}catch(e){t(new s.CometChatException(e))}})},u.prototype.endCall=function(e){var t=this;try{document.getElementsByName("frame").forEach(function(e){t.view&&(t.view.removeChild(e),t.view=void 0)}),this.endCallSession()}catch(e){l.Logger.error("CallController: endCall",e)}},u.prototype.onCallStarted=function(n){var o=this;return new Promise(function(e,t){try{l.isFalsy(o.call)?null!=n&&null!=n?e(o.call=n):t(new s.CometChatException(S.CALL_ERROR.ERROR_IN_CALLING)):t(new s.CometChatException(S.CALL_ERROR.CALL_ALREADY_INITIATED))}catch(e){t(new s.CometChatException(e))}})},u.prototype.endCallSession=function(){try{this.call=void 0,u.callController=void 0,this.timer&&this.stopCallTimer(),this.view=void 0,this.removeListener(),u.callScreen=null,u.callSettings=null}catch(e){l.Logger.error("CallController:EndCallSession",{e:e})}},u.prototype.startCallTimer=function(){var t=this;try{this.timer=setTimeout(function(){t.call?p.CometChat.sendUnansweredResponse(t.call.getSessionId()).then(function(e){t.endCallSession()},function(e){t.endCallSession()}):t.endCallSession()},this.CALL_NO_ANSWER_INTERVAL)}catch(e){l.Logger.error("CallController: startCallTimer",e)}},u.prototype.stopCallTimer=function(){try{clearTimeout(this.timer)}catch(e){l.Logger.error("CallController: stopCallTimer",e)}},u.prototype.startCall=function(t,n){var o=this;try{this.timer&&this.stopCallTimer();var s=document.createElement("iframe");this.getCallUrl().then(function(e){s.src=e+"",s.name="frame",s.setAttribute("allow","camera; microphone; display-capture;"),s.setAttribute("width","100%"),s.setAttribute("height","100%"),u.callScreen=s,u.callSettings=t,n&&(o.view=n),n.appendChild(s),o.addListener()})}catch(e){l.Logger.error("CallController: startCall",e)}},u.prototype.addListener=function(){window.addEventListener("message",this.handler,!0)},u.prototype.removeListener=function(){window.removeEventListener("message",this.handler,!0)},u.prototype.handler=function(e){var t,n=this,o=u.callSettings,s=u.callScreen,r=u.getInstance().getActiveCall();try{if(void 0!==(t=JSON.parse(e.data))&&t.type==S.CallConstants.POST_MESSAGES.TYPES.HANGUP)u.deviceList=null,r?(l.Logger.info(this.TAG,u.callListner),window.setTimeout(function(){p.CometChat.endCall(r.getSessionId(),!0).then(function(e){l.Logger.info(n.TAG,{call:e})}).catch(function(e){l.Logger.info(n.TAG,"The Call Was Already Ended")})},1e3)):p.CometChat.endCall(o.getSessionId(),!0).then(function(e){l.Logger.info(n.TAG,{call:e})}).catch(function(e){l.Logger.info(n.TAG,"The Call Was Already Ended")});else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_JOINED){if(t.value){var i=void 0,a=t.value;l.isFalsy(a.uid)||l.isFalsy(a.name)||((i=new C.User(a)).setStatus("online"),p.CometChat.user.getUid().toLowerCase()!=i.getUid().toLowerCase()&&u.callListner&&(l.isFalsy(u.callListner._eventListener.onUserJoined)||u.callListner._eventListener.onUserJoined(i)))}}else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_LEFT){if(t.value){i=void 0,a=t.value;l.isFalsy(a.uid)||l.isFalsy(a.name)||((i=new C.User(a)).setStatus("online"),p.CometChat.user.getUid().toLowerCase()!=i.getUid().toLowerCase()&&u.callListner&&(l.isFalsy(u.callListner._eventListener.onUserLeft)||u.callListner._eventListener.onUserLeft(i)))}}else if(void 0!==t&&t.type==S.CallConstants.POST_MESSAGES.TYPES.ACTION_MESSAGE&&t.action==S.CallConstants.POST_MESSAGES.ACTIONS.USER_LIST_CHANGED){var E=[];if(t.value&&0a.DEFAULT_VALUES.GROUPS_MAX_LIMIT)return new r.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.GROUPS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0u.DEFAULT_VALUES.USERS_MAX_LIMIT)return new E.CometChatException(JSON.parse(i.format(JSON.stringify(u.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",u.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0c.DEFAULT_VALUES.USERS_MAX_LIMIT)return new a.CometChatException(JSON.parse(o.format(JSON.stringify(c.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",c.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},s.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0a.DEFAULT_VALUES.CONVERSATION_MAX_LIMIT?new r.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.CONVERSATION_MAX_LIMIT))):this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e}();t.ConversationsRequest=E;var c=function(){function e(){}return e.prototype.setLimit=function(e){return this.limit=e,this},e.prototype.setConversationType=function(e){return this.conversationType=e,this},e.prototype.build=function(){return new E(this)},e}();t.ConversationsRequestBuilder=c},function(e,t,n){"use strict";var d=this&&this.__awaiter||function(r,i,a,E){return new(a||(a=Promise))(function(e,t){function n(e){try{s(E.next(e))}catch(e){t(e)}}function o(e){try{s(E.throw(e))}catch(e){t(e)}}function s(t){t.done?e(t.value):new a(function(e){e(t.value)}).then(n,o)}s((E=E.apply(r,i||[])).next())})},_=this&&this.__generator||function(n,o){var s,r,i,e,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(s)throw new TypeError("Generator is already executing.");for(;a;)try{if(s=1,r&&(i=2&t[0]?r.return:t[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,t[1])).done)return i;switch(r=0,i&&(t=[2&t[0],i.value]),t[0]){case 0:case 1:i=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,r=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(i=0<(i=a.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]R.DEFAULT_VALUES.MSGS_MAX_LIMIT)return void t(new h.CometChatException(JSON.parse(f.format(JSON.stringify(R.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",R.DEFAULT_VALUES.MSGS_MAX_LIMIT))));if(re&&O.MessageListnerMaping.getInstance().set(R.LOCAL_STORE.KEY_MESSAGE_LISTENER_LIST,parseInt(t.id))},function(e){O.MessageListnerMaping.getInstance().set(R.LOCAL_STORE.KEY_MESSAGE_LISTENER_LIST,parseInt(t.id))}),o.affix==R.MessageConstatnts.PAGINATION.AFFIX.APPEND?(o.idparseInt(t.id)&&(o.id=parseInt(t.id)),o.timestamp>t.sentAt&&(o.timestamp=t.sentAt),o.updatedAt>t.updatedAt&&(o.updatedAt=t.updatedAt)),o.id&&(o.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.ID]=o.id),o.timestamp&&(o.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.SENT_AT]=o.timestamp),o.updatedAt&&(o.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.UPDATED_AT]=o.updatedAt),n.push(I.MessageController.trasformJSONMessge(t))})):n=[],s(n),[2]})})},function(e){t(new h.CometChatException(e.error))})}catch(e){t(new h.CometChatException(e))}})},e.prototype.createEndpoint=function(){this.parentMessageId?(this.endpointName="getThreadMessages",this.listId=this.parentMessageId.toString(),this.hideReplies&&(this.hideReplies=!1,delete this.paginationMeta[R.MessageConstatnts.PAGINATION.KEYS.HIDE_REPLIES])):(f.isFalsy(this.guid)||f.isFalsy(this.uid))&&f.isFalsy(this.guid)?(f.isFalsy(this.uid)?this.endpointName="getMessages":this.endpointName="getUserMessages",this.listId=this.uid):(this.endpointName="getGroupMessages",this.listId=this.guid)},e.prototype.makeData=function(){var e={};e[R.MessageConstatnts.PAGINATION.KEYS.PER_PAGE]=this.limit,e[R.MessageConstatnts.PAGINATION.KEYS.AFFIX]=this.affix,(f.isFalsy(this.guid)||f.isFalsy(this.uid))&&f.isFalsy(this.guid)&&f.isFalsy(this.uid)},e.prototype.getFilteredPreviousDataByReceiverId=function(t){return d(this,void 0,void 0,function(){var n,o=this;return _(this,function(e){switch(e.label){case 0:switch(n=[],t){case"user":return[3,1];case"group":return[3,3];case"both":return[3,5]}return[3,7];case 1:return[4,s.MessagesStore.getInstance().get(this.uid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 2:return e.sent(),[3,9];case 3:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 4:e.sent(),e.label=5;case 5:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).filter(function(e){return t[e].sender.uid==o.uid}).map(function(e){n=n.concat([t[e]])})})];case 6:return e.sent(),[3,9];case 7:return[4,s.MessagesStore.getInstance().getAllMessages().then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 8:return e.sent(),[3,9];case 9:return[2,n]}})})},e.prototype.getFilteredNextDataByReceiverId=function(t){return d(this,void 0,void 0,function(){var n,o=this;return _(this,function(e){switch(e.label){case 0:switch(n=[],t){case"user":return[3,1];case"group":return[3,3];case"both":return[3,5]}return[3,7];case 1:return[4,s.MessagesStore.getInstance().get(this.uid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 2:return e.sent(),[3,9];case 3:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 4:e.sent(),e.label=5;case 5:return[4,s.MessagesStore.getInstance().get(this.guid).then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).filter(function(e){return t[e].sender.uid==o.uid}).map(function(e){n=n.concat([t[e]])})})];case 6:return e.sent(),[3,9];case 7:return[4,s.MessagesStore.getInstance().getAllMessages().then(function(t){Object.keys(t).filter(function(e){return parseInt(e)>o.id}).map(function(e){n=n.concat([t[e]])})})];case 8:return e.sent(),[3,9];case 9:return[2,n]}})})},e}();t.DefaultMessagesRequest=o;var r=function(){function e(){this.maxLimit=R.DEFAULT_VALUES.MSGS_MAX_LIMIT,this.timestamp=0,this.id=R.DEFAULT_VALUES.DEFAULT_MSG_ID,this.unread=!1,this.HideMessagesFromBlockedUsers=!1,this.onlyUpdate=0,this.HideDeletedMessages=!1}return e.prototype.setLimit=function(e){return this.limit=e,this},e.prototype.setGUID=function(e){return this.guid=e,this},e.prototype.setUID=function(e){return this.uid=e,this},e.prototype.setParentMessageId=function(e){return this.parentMessageId=e,this},e.prototype.setTimestamp=function(e){return void 0===e&&(e=f.getCurrentTime()),this.timestamp=e,this},e.prototype.setMessageId=function(e){return void 0===e&&(e=R.DEFAULT_VALUES.DEFAULT_MSG_ID),this.id=e,this},e.prototype.setUnread=function(e){return void 0===e&&(e=!1),this.unread=e,this},e.prototype.hideMessagesFromBlockedUsers=function(e){return void 0===e&&(e=!1),this.HideMessagesFromBlockedUsers=e,this},e.prototype.setSearchKeyword=function(e){return this.searchKey=e,this},e.prototype.setUpdatedAfter=function(e){return this.updatedAt=e,this},e.prototype.updatesOnly=function(e){return e&&(this.onlyUpdate=1),this},e.prototype.setCategory=function(e){return this.category=e,this},e.prototype.setCategories=function(e){return this.categories=e,this},e.prototype.setType=function(e){return this.type=e,this},e.prototype.setTypes=function(e){return this.types=e,this},e.prototype.hideReplies=function(e){return this.HideReplies=e,this},e.prototype.hideDeletedMessages=function(e){return this.HideDeletedMessages=e,this},e.prototype.build=function(){return this.category&&this.categories&&this.categories.push(this.category),this.type&&this.types&&this.types.push(this.type),new o(this)},e}();t.DefaultMessagesRequestBuilder=r},function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;ne.getId()&&(i=parseInt(e.getId().toString())),oa.DEFAULT_VALUES.USERS_MAX_LIMIT)return new i.CometChatException(JSON.parse(o.format(JSON.stringify(a.GENERAL_ERROR.LIMIT_EXCEEDED),"SET_LIMIT","SET_LIMIT",a.DEFAULT_VALUES.USERS_MAX_LIMIT)));if(this.limitthis.total_pages)return e.page=this.next_page,e;e.page=this.next_page++}return e},e.prototype.getPreData=function(){var e={};return e.per_page=this.limit,0<=this.next_page&&0>>((3&t)<<3)&255;return s}}},function(e,t){for(var s=[],n=0;n<256;++n)s[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=s;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}}])}); \ No newline at end of file diff --git a/README.md b/README.md index 8230cbf..d5acc04 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ This guide demonstrates how to add chat to a WebSite using CometChat Pro. [Push Notification](https://prodocs.cometchat.com/docs/extensions-enhanced-push-notification) | [Email Notification](https://prodocs.cometchat.com/docs/extensions-email-notification) | [SMS Notification](https://prodocs.cometchat.com/docs/extensions-sms-notification) | [Thumbnail Generation](https://prodocs.cometchat.com/docs/extensions-thumbnail-generation) | [Link Preview](https://prodocs.cometchat.com/docs/extensions-link-preview) | [Rich Media Preview](https://prodocs.cometchat.com/docs/extensions-rich-media-preview) | [Voice Transcription](https://prodocs.cometchat.com/docs/extensions-voice-transcription) | [Smart Reply](https://prodocs.cometchat.com/docs/extensions-smart-reply) | [Message Translation](https://prodocs.cometchat.com/docs/extensions-message-translation) | [Emojis](https://prodocs.cometchat.com/docs/extensions-emojis) | [Polls](https://prodocs.cometchat.com/docs/extensions-polls) | [Reactions](https://prodocs.cometchat.com/docs/extensions-reactions) | [Stickers](https://prodocs.cometchat.com/docs/extensions-stickers) | [Video Broadcasting](https://prodocs.cometchat.com/docs/extensions-broadcast) | [Collaborative Documents](https://prodocs.cometchat.com/docs/extensions-collaborative-document) | [Collaborative Whiteboards](https://prodocs.cometchat.com/docs/extensions-collaborative-whiteboard) | [Data Masking Filter](https://prodocs.cometchat.com/docs/extensions-data-masking-filter) | [Profanity Filter](https://prodocs.cometchat.com/docs/extensions-profanity-filter) | [Image Moderation](https://prodocs.cometchat.com/docs/extensions-image-moderation)| [Sentiment Analysis](https://prodocs.cometchat.com/docs/extensions-sentiment-analysis) | [In-flight Message Moderation](https://prodocs.cometchat.com/docs/extensions-in-flight-message-moderation) | [Virus & Malware Scanner](https://prodocs.cometchat.com/docs/extensions-virus-malware-scanner) | [XSS Filter](https://prodocs.cometchat.com/docs/extensions-xss-filter) [![Platform](https://img.shields.io/badge/Platform-Javascript-brightgreen)](#) - + ![GitHub repo size](https://img.shields.io/github/repo-size/cometchat-pro/javascript-chat-sdk) ![GitHub contributors](https://img.shields.io/github/contributors/cometchat-pro/javascript-chat-sdk) ![GitHub stars](https://img.shields.io/github/stars/cometchat-pro/javascript-chat-sdk?style=social) @@ -78,7 +78,7 @@ To setup Javascript SDK, you need to first register on CometChat Dashboard. [Cl 1. Run the following command to install the CometChat Pro Javascript SDK
```javascript - npm install @cometchat-pro/chat@3.0.0-beta6 --save + npm install @cometchat-pro/chat@3.0.0-beta7 --save ``` @@ -87,7 +87,7 @@ To setup Javascript SDK, you need to first register on CometChat Dashboard. [Cl 1. Include the CometChat Pro Javascript library in your HTML code.
```html - + ``` You can refer to the below link for instructions on how to do so:
diff --git a/package.json b/package.json index 510d634..b155cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cometchat-pro/chat", - "version": "3.0.0-beta6", + "version": "3.0.0-beta7", "description": "A complete chat solution.", "main": "CometChat.js", "scripts": {