podchat-browser 12.9.8-snapshot.5 → 12.9.9
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/changelog.md +17 -0
- package/dist/node/buildConfig.json +1 -1
- package/dist/node/chat.js +1 -1
- package/dist/podchat-browser-bundle.js +2 -2
- package/package.json +2 -2
- package/src/buildConfig.json +1 -1
package/changelog.md
CHANGED
|
@@ -5,6 +5,23 @@ to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.i
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [12.9.8] 31-01-2024
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Methods setRoleToUser/removeRoleFromUser
|
|
12
|
+
- field lastReactionVO to thread object
|
|
13
|
+
- cache for getPinMessages
|
|
14
|
+
- validation for appId
|
|
15
|
+
- Method lastActionInThread
|
|
16
|
+
- support for multiple typeCodes
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Incorrect parameter access in reactionSummaries
|
|
20
|
+
- Fixed errors in call message id: GET_KEY_FRAME
|
|
21
|
+
- Keyframe problems on start record
|
|
22
|
+
- Minor bug fixes
|
|
23
|
+
- Fixed name is blob from podspace
|
|
24
|
+
|
|
8
25
|
## [12.9.7] 25-11-2023
|
|
9
26
|
|
|
10
27
|
### Added
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"12.9.
|
|
1
|
+
{"version":"12.9.9","date":"۱۴۰۲/۱۱/۱۱","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
|
package/dist/node/chat.js
CHANGED
|
@@ -6069,7 +6069,7 @@ function Chat(params) {
|
|
|
6069
6069
|
var name = result.result.name != 'blob' ? result.result.name : uploadHandlerMetadata.file.originalName;
|
|
6070
6070
|
metadata['fileHash'] = result.result.hash;
|
|
6071
6071
|
metadata['name'] = name;
|
|
6072
|
-
metadata['file']['name'] =
|
|
6072
|
+
metadata['file']['name'] = name;
|
|
6073
6073
|
metadata['file']['fileHash'] = result.result.hash;
|
|
6074
6074
|
metadata['file']['hashCode'] = result.result.hash;
|
|
6075
6075
|
metadata['file']['parentHash'] = result.result.parentHash;
|
|
@@ -41723,7 +41723,7 @@ FilterXSS.prototype.process = function (html) {
|
|
|
41723
41723
|
module.exports = FilterXSS;
|
|
41724
41724
|
|
|
41725
41725
|
},{"./default":253,"./parser":255,"./util":256,"cssfilter":124}],258:[function(require,module,exports){
|
|
41726
|
-
module.exports={"version":"12.9.
|
|
41726
|
+
module.exports={"version":"12.9.9","date":"۱۴۰۲/۱۱/۱۱","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
|
|
41727
41727
|
},{}],259:[function(require,module,exports){
|
|
41728
41728
|
"use strict";
|
|
41729
41729
|
|
|
@@ -45681,7 +45681,7 @@ var uploadFileData={};if(params){if(typeof params.file!=='undefined'){uploadFile
|
|
|
45681
45681
|
*
|
|
45682
45682
|
* @return {object} Uploaded Image Object
|
|
45683
45683
|
*/uploadImageToPodspaceUserGroupNew=function uploadImageToPodspaceUserGroupNew(params,callback){var fileName,fileType,fileSize,fileWidth=0,fileHeight=0,fileExtension,uploadUniqueId,uploadThreadId;var continueImageUpload=function continueImageUpload(params){if(_constants.imageMimeTypes.indexOf(fileType)>=0||_constants.imageExtentions.indexOf(fileExtension)>=0){var uploadImageData={};if(params){if(typeof params.image!=='undefined'){uploadImageData.file=params.image;}else{callback({hasError:true,errorCode:999,errorMessage:'You need to send a image file!'});return;}if(typeof params.userGroupHash=='string'){uploadImageData.userGroupHash=params.userGroupHash;}else{callback({hasError:true,errorCode:999,errorMessage:'You need to enter a userGroupHash to be able to upload on PodSpace!'});return;}if(params.randomFileName){uploadImageData.fileName=_utility["default"].generateUUID()+'.'+fileExtension;}else{uploadImageData.filename=fileName;}uploadImageData.fileSize=fileSize;if(parseInt(params.threadId)>0){uploadThreadId=params.threadId;uploadImageData.threadId=params.threadId;}else{uploadThreadId=0;uploadImageData.threadId=0;}if(typeof params.uniqueId=='string'){uploadUniqueId=params.uniqueId;uploadImageData.uniqueId=params.uniqueId;}else{uploadUniqueId=_utility["default"].generateUUID();uploadImageData.uniqueId=uploadUniqueId;}if(typeof params.originalFileName=='string'){uploadImageData.originalFileName=params.originalFileName;}else{uploadImageData.originalFileName=fileName;}uploadImageData.x=parseInt(params.xC)||0;uploadImageData.y=parseInt(params.yC)||0;uploadImageData.height=parseInt(params.hC)||fileHeight;uploadImageData.weight=parseInt(params.wC)||fileWidth;}httpRequest({url:SERVICE_ADDRESSES.PODSPACE_FILESERVER_ADDRESS+SERVICES_PATH.PODSPACE_UPLOAD_IMAGE_TO_USERGROUP_NEW.replace('{userGroupHash}',uploadImageData.userGroupHash),method:'POST',headers:{'Authorization':'Bearer '+app.sdkParams.token},data:uploadImageData,uniqueId:uploadUniqueId},function(result){if(!result.hasError){try{var response=typeof result.result.responseText=='string'?JSON.parse(result.result.responseText):result.result.responseText;if(response.status<400){response.result.actualHeight=fileHeight;response.result.actualWidth=fileWidth;callback({hasError:response.hasError,result:response.result});}else{callback({hasError:true,errorCode:response.errorCode,errorMessage:response.message});}}catch(e){app.sdkParams.consoleLogging&&console.log(e);callback({hasError:true,errorCode:6300,errorMessage:CHAT_ERRORS[6300]});}}else{callback({hasError:true,errorCode:result.errorCode,errorMessage:result.errorMessage});}});return{uniqueId:uploadUniqueId,threadId:uploadThreadId,participant:app.store.user.get(),content:{caption:params.content,file:{uniqueId:uploadUniqueId,fileName:fileName,fileSize:fileSize,fileObject:params.file}}};}else{callback({hasError:true,errorCode:6301,errorMessage:CHAT_ERRORS[6301]});}};fileName=params.image.name;fileType=params.image.type;fileSize=params.image.size;fileExtension=params.image.name.split('.').pop();var reader=new FileReader();reader.onload=function(e){var image=new Image();image.onload=function(){fileWidth=this.width;fileHeight=this.height;continueImageUpload(params);};image.src=e.target.result;};reader.readAsDataURL(params.image);},sendFileMessage=function sendFileMessage(params,callbacks){var metadata={file:{}},fileUploadParams={},fileUniqueId=typeof params.fileUniqueId=='string'&¶ms.fileUniqueId.length>0?params.fileUniqueId:_utility["default"].generateUUID();if(params){if(!params.userGroupHash||params.userGroupHash.length===0||typeof params.userGroupHash!=='string'){app.chatEvents.fireEvent('error',{code:6304,message:CHAT_ERRORS[6304]});return;}else{fileUploadParams.userGroupHash=params.userGroupHash;}return chatUploadHandler({threadId:params.threadId,file:params.file,fileUniqueId:fileUniqueId},function(uploadHandlerResult,uploadHandlerMetadata,fileType,fileExtension){fileUploadParams=Object.assign(fileUploadParams,uploadHandlerResult);putInChatUploadQueue({message:{chatMessageVOType:_constants.chatMessageVOTypes.MESSAGE,typeCode:params.typeCode,messageType:params.messageType&&typeof params.messageType.toUpperCase()!=='undefined'&&_constants.chatMessageTypes[params.messageType.toUpperCase()]>0?_constants.chatMessageTypes[params.messageType.toUpperCase()]:1,subjectId:params.threadId,repliedTo:params.repliedTo,content:filterXSS(params.content),metadata:JSON.stringify(objectDeepMerger(uploadHandlerMetadata,params.metadata)),systemMetadata:JSON.stringify(params.systemMetadata),uniqueId:fileUniqueId,pushMsgType:3},callbacks:callbacks},function(){if(_constants.imageMimeTypes.indexOf(fileType)>=0||_constants.imageExtentions.indexOf(fileExtension)>=0){uploadImageToPodspaceUserGroupNew(fileUploadParams,function(result){if(!result.hasError){var name=result.result.name!='blob'?result.result.name:uploadHandlerMetadata.file.originalName;// Send onFileUpload callback result
|
|
45684
|
-
if((0,_typeof2["default"])(callbacks)==='object'&&callbacks.hasOwnProperty('onFileUpload')){callbacks.onFileUpload&&callbacks.onFileUpload({name:name,hashCode:result.result.hash,parentHash:result.result.parentHash,size:result.result.size,actualHeight:result.result.actualHeight,actualWidth:result.result.actualWidth,link:"".concat(SERVICE_ADDRESSES.PODSPACE_FILESERVER_ADDRESS,"/api/images/").concat(result.result.hash,"?checkUserGroupAccess=true")});}metadata['name']=name;metadata['fileHash']=result.result.hash;metadata['file']['name']=name;metadata['file']['fileHash']=result.result.hash;metadata['file']['hashCode']=result.result.hash;metadata['file']['parentHash']=result.result.parentHash;metadata['file']['size']=result.result.size;metadata['file']['actualHeight']=result.result.actualHeight;metadata['file']['actualWidth']=result.result.actualWidth;metadata['file']['link']="".concat(SERVICE_ADDRESSES.PODSPACE_FILESERVER_ADDRESS,"/api/images/").concat(result.result.hash,"?checkUserGroupAccess=true");transferFromUploadQToSendQ(parseInt(params.threadId),fileUniqueId,JSON.stringify(metadata),function(){chatSendQueueHandler();});}else{deleteFromChatUploadQueue({message:{uniqueId:fileUniqueId}});}});}else{uploadFileToPodspaceUserGroupNew(fileUploadParams,function(result){if(!result.hasError){var name=result.result.name!='blob'?result.result.name:uploadHandlerMetadata.file.originalName;metadata['fileHash']=result.result.hash;metadata['name']=name;metadata['file']['name']=
|
|
45684
|
+
if((0,_typeof2["default"])(callbacks)==='object'&&callbacks.hasOwnProperty('onFileUpload')){callbacks.onFileUpload&&callbacks.onFileUpload({name:name,hashCode:result.result.hash,parentHash:result.result.parentHash,size:result.result.size,actualHeight:result.result.actualHeight,actualWidth:result.result.actualWidth,link:"".concat(SERVICE_ADDRESSES.PODSPACE_FILESERVER_ADDRESS,"/api/images/").concat(result.result.hash,"?checkUserGroupAccess=true")});}metadata['name']=name;metadata['fileHash']=result.result.hash;metadata['file']['name']=name;metadata['file']['fileHash']=result.result.hash;metadata['file']['hashCode']=result.result.hash;metadata['file']['parentHash']=result.result.parentHash;metadata['file']['size']=result.result.size;metadata['file']['actualHeight']=result.result.actualHeight;metadata['file']['actualWidth']=result.result.actualWidth;metadata['file']['link']="".concat(SERVICE_ADDRESSES.PODSPACE_FILESERVER_ADDRESS,"/api/images/").concat(result.result.hash,"?checkUserGroupAccess=true");transferFromUploadQToSendQ(parseInt(params.threadId),fileUniqueId,JSON.stringify(metadata),function(){chatSendQueueHandler();});}else{deleteFromChatUploadQueue({message:{uniqueId:fileUniqueId}});}});}else{uploadFileToPodspaceUserGroupNew(fileUploadParams,function(result){if(!result.hasError){var name=result.result.name!='blob'?result.result.name:uploadHandlerMetadata.file.originalName;metadata['fileHash']=result.result.hash;metadata['name']=name;metadata['file']['name']=name;metadata['file']['fileHash']=result.result.hash;metadata['file']['hashCode']=result.result.hash;metadata['file']['parentHash']=result.result.parentHash;metadata['file']['size']=result.result.size;transferFromUploadQToSendQ(parseInt(params.threadId),fileUniqueId,JSON.stringify(metadata),function(){chatSendQueueHandler();});}else{deleteFromChatUploadQueue({message:{uniqueId:fileUniqueId}});}});}});});}},/**
|
|
45685
45685
|
* Delete Cache Database
|
|
45686
45686
|
*
|
|
45687
45687
|
* This function truncates all tables of cache Database
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podchat-browser",
|
|
3
|
-
"version": "12.9.
|
|
3
|
+
"version": "12.9.9",
|
|
4
4
|
"description": "Javascript SDK to use POD's Chat Service - Browser Only",
|
|
5
5
|
"main": "./dist/node/chat.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publish:snapshot": "npm run version:snapshot && npm run build && npm run commitVersionChanges && npm publish --tag snapshot",
|
|
9
9
|
"version:snapshot": "npm version prerelease --preid snapshot",
|
|
10
10
|
"publish:release": "npm run version:release && npm run build && npm run commitVersionChanges && npm publish",
|
|
11
|
-
"version:release": "npm version 12.9.
|
|
11
|
+
"version:release": "npm version 12.9.9",
|
|
12
12
|
"build:browser": "browserify -t [ babelify ] src/chat.js > dist/podchat-browser-bundle.js",
|
|
13
13
|
"build:npm": "babel src -d dist/node --copy-files",
|
|
14
14
|
"commitVersionChanges": "git add . && git commit -m \"Version\" && npm run wait",
|
package/src/buildConfig.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"12.9.
|
|
1
|
+
{"version":"12.9.9","date":"۱۴۰۲/۱۱/۱۱","VersionInfo":"Release: true, Snapshot: false, Is For Test: false"}
|