sceyt-chat-react-uikit 1.9.2-beta.1 → 1.9.2-beta.3
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/components/ChatContainer/index.d.ts +14 -1
- package/index.js +25 -20
- package/index.modern.js +25 -20
- package/package.json +1 -1
|
@@ -19,7 +19,20 @@ export interface IUploadTask {
|
|
|
19
19
|
}
|
|
20
20
|
export interface ICustomUploader {
|
|
21
21
|
upload: (attachment: IAttachment, uploadTask: IUploadTask, messageType: string | null | undefined) => void;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* `messageId` is the ID of a message the attachment appears in, supplied by
|
|
24
|
+
* the client. Treat it as a hint, not proof of access:
|
|
25
|
+
* - Media previews (images, videos, voice, video thumbnails) are shared and
|
|
26
|
+
* cached by `uri`. When several messages use the same file (e.g. forwards),
|
|
27
|
+
* only the first request's ID is sent, and its failure is shared too.
|
|
28
|
+
* - A file already in the browser's attachment cache is served without
|
|
29
|
+
* calling `download`; that cache is per origin, not per user.
|
|
30
|
+
* - It may be empty (`''`) or missing for messages that are not confirmed yet.
|
|
31
|
+
* The backend must verify that the caller can read the message and that
|
|
32
|
+
* `uri` legitimately belongs to it (e.g. traced to its original upload),
|
|
33
|
+
* before serving the file.
|
|
34
|
+
*/
|
|
35
|
+
download: (uri: string, download: boolean, progressCallback: (progress: any) => void, messageType: string | null | undefined, messageId?: string | null) => Promise<any>;
|
|
23
36
|
cancelRequest: (requestPromise: any) => void;
|
|
24
37
|
}
|
|
25
38
|
export declare type ThemeColors = 'accent' | 'avatarBrand1' | 'avatarBrand2' | 'avatarBrand3' | 'avatarBrand4' | 'textPrimary' | 'textSecondary' | 'textFootnote' | 'textOnPrimary' | 'border' | 'iconInactive' | 'iconPrimary' | 'background' | 'backgroundSections' | 'backgroundFocused' | 'backgroundHovered' | 'overlayBackground' | 'overlayBackground2' | 'surface1' | 'surface2' | 'surfaceX' | 'warning' | 'attention' | 'onlineStatus' | 'success' | 'outgoingMessageBackground' | 'outgoingMessageBackgroundX' | 'incomingMessageBackground' | 'incomingMessageBackgroundX' | 'linkColor' | 'highlightedBackground';
|
package/index.js
CHANGED
|
@@ -11381,7 +11381,7 @@ var downloadFile = function downloadFile(attachment, download, done, progressCal
|
|
|
11381
11381
|
if (progressCallback) {
|
|
11382
11382
|
progressCallback(progress);
|
|
11383
11383
|
}
|
|
11384
|
-
}, messageType);
|
|
11384
|
+
}, messageType, attachment.messageId);
|
|
11385
11385
|
filesPromisesOnDownload[attachment.id] = urlPromise;
|
|
11386
11386
|
return Promise.resolve(urlPromise).then(function (result) {
|
|
11387
11387
|
FileSaver.saveAs(result.Body, attachment.name);
|
|
@@ -17754,7 +17754,7 @@ var download = function download(request, job) {
|
|
|
17754
17754
|
if (customDownloader) {
|
|
17755
17755
|
var _request$customDownlo;
|
|
17756
17756
|
var requestBlob = (_request$customDownlo = request.customDownload) != null ? _request$customDownlo : true;
|
|
17757
|
-
var customRequest = customDownloader(request.url, requestBlob, reportProgress, request.messageType);
|
|
17757
|
+
var customRequest = customDownloader(request.url, requestBlob, reportProgress, request.messageType, request.messageId);
|
|
17758
17758
|
job.customRequest = customRequest;
|
|
17759
17759
|
return Promise.resolve(customRequest).then(function (result) {
|
|
17760
17760
|
var body = (result === null || result === void 0 ? void 0 : result.Body) || result;
|
|
@@ -17953,7 +17953,7 @@ var getVideoAttachmentCacheKeys = function getVideoAttachmentCacheKeys(videoUrl,
|
|
|
17953
17953
|
originalVideo: videoUrl + "_original_video_url"
|
|
17954
17954
|
};
|
|
17955
17955
|
};
|
|
17956
|
-
var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, messageType) {
|
|
17956
|
+
var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, messageType, messageId) {
|
|
17957
17957
|
try {
|
|
17958
17958
|
return Promise.resolve(getAttachmentUrlFromCache(videoThumb)["catch"](function () {
|
|
17959
17959
|
return false;
|
|
@@ -17964,6 +17964,7 @@ var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, mes
|
|
|
17964
17964
|
cacheKey: videoThumb,
|
|
17965
17965
|
kind: 'video-thumbnail',
|
|
17966
17966
|
messageType: messageType,
|
|
17967
|
+
messageId: messageId,
|
|
17967
17968
|
downloader: downloader,
|
|
17968
17969
|
customDownload: true,
|
|
17969
17970
|
skipCacheLookup: true
|
|
@@ -42017,9 +42018,15 @@ var VideoPreview = /*#__PURE__*/React.memo(function VideoPreview(_ref) {
|
|
|
42017
42018
|
var previousVideoSourceRef = React.useRef(undefined);
|
|
42018
42019
|
React.useEffect(function () {
|
|
42019
42020
|
if (!videoThumb || downloadedPreviewImage) return;
|
|
42021
|
+
var customDownloader = getCustomDownloader();
|
|
42022
|
+
var previewRequest = customDownloader && !file.messageId ? getAttachmentUrlFromCache(videoThumb)["catch"](function () {
|
|
42023
|
+
return false;
|
|
42024
|
+
}).then(function (cachedUrl) {
|
|
42025
|
+
return typeof cachedUrl === 'string' ? cachedUrl : undefined;
|
|
42026
|
+
}) : downloadVideoThumb(videoThumb, customDownloader, messageType, file.messageId);
|
|
42020
42027
|
var cancelled = false;
|
|
42021
|
-
|
|
42022
|
-
if (!cancelled) {
|
|
42028
|
+
previewRequest.then(function (localPreviewUrl) {
|
|
42029
|
+
if (!cancelled && localPreviewUrl) {
|
|
42023
42030
|
dispatch(setUpdateMessageAttachmentAC(videoThumb, localPreviewUrl));
|
|
42024
42031
|
}
|
|
42025
42032
|
})["catch"](function (error) {
|
|
@@ -42028,7 +42035,7 @@ var VideoPreview = /*#__PURE__*/React.memo(function VideoPreview(_ref) {
|
|
|
42028
42035
|
return function () {
|
|
42029
42036
|
cancelled = true;
|
|
42030
42037
|
};
|
|
42031
|
-
}, [videoThumb, downloadedPreviewImage, dispatch, messageType]);
|
|
42038
|
+
}, [videoThumb, downloadedPreviewImage, dispatch, messageType, file.messageId]);
|
|
42032
42039
|
React.useEffect(function () {
|
|
42033
42040
|
var videoSource = src;
|
|
42034
42041
|
var canExtractFirstFrame = shouldExtractVideoFirstFrame(file.metadata);
|
|
@@ -42173,7 +42180,7 @@ var VideoPreview = /*#__PURE__*/React.memo(function VideoPreview(_ref) {
|
|
|
42173
42180
|
messageTimeBackgroundColor: overlayBackground2
|
|
42174
42181
|
}, !isRepliedMessage && !isPreview && /*#__PURE__*/React__default.createElement(SvgVideoCall, null), videoCurrentTime))));
|
|
42175
42182
|
}, function (prev, next) {
|
|
42176
|
-
return prev.src === next.src && prev.file.id === next.file.id && prev.file.url === next.file.url && prev.file.metadata === next.file.metadata && prev.uploading === next.uploading && prev.downloading === next.downloading && prev.width === next.width && prev.height === next.height && prev.borderRadius === next.borderRadius && prev.isRepliedMessage === next.isRepliedMessage && prev.isDetailsView === next.isDetailsView;
|
|
42183
|
+
return prev.src === next.src && prev.file.id === next.file.id && prev.file.messageId === next.file.messageId && prev.messageType === next.messageType && prev.file.url === next.file.url && prev.file.metadata === next.file.metadata && prev.uploading === next.uploading && prev.downloading === next.downloading && prev.width === next.width && prev.height === next.height && prev.borderRadius === next.borderRadius && prev.isRepliedMessage === next.isRepliedMessage && prev.isDetailsView === next.isDetailsView;
|
|
42177
42184
|
});
|
|
42178
42185
|
var VideoControls = styled__default.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 6;\n"])));
|
|
42179
42186
|
var VideoTime = styled__default.div(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: ", ";\n font-size: ", ";\n display: flex;\n align-items: center;\n border-radius: 16px;\n padding: ", ";\n background-color: ", ";\n line-height: 14px;\n color: ", ";\n z-index: 10;\n\n & > svg {\n color: ", ";\n margin-right: 4px;\n }\n"])), function (props) {
|
|
@@ -42455,17 +42462,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42455
42462
|
if (downloadIsCancelled) {
|
|
42456
42463
|
setDownloadIsCancelled(false);
|
|
42457
42464
|
if (customDownloader) {
|
|
42458
|
-
|
|
42459
|
-
var loadedRes = progress.loaded && progress.loaded / progress.total;
|
|
42460
|
-
var uploadPercent = loadedRes && loadedRes * 100;
|
|
42461
|
-
setSizeProgress({
|
|
42462
|
-
loaded: progress.loaded || 0,
|
|
42463
|
-
total: progress.total || 0
|
|
42464
|
-
});
|
|
42465
|
-
setProgress(uploadPercent);
|
|
42466
|
-
}, messageType).then(function (url) {
|
|
42467
|
-
downloadImage(url);
|
|
42468
|
-
});
|
|
42465
|
+
handleResumeOriginalImageDownload(e);
|
|
42469
42466
|
} else {
|
|
42470
42467
|
downloadImage(attachment.url);
|
|
42471
42468
|
}
|
|
@@ -42555,7 +42552,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42555
42552
|
total: progress.total || 0
|
|
42556
42553
|
});
|
|
42557
42554
|
setProgress(uploadPercent);
|
|
42558
|
-
}, messageType);
|
|
42555
|
+
}, messageType, attachment.messageId);
|
|
42559
42556
|
setDownloadFilePromise(attachment.id, urlPromise);
|
|
42560
42557
|
return Promise.resolve(urlPromise).then(function (result) {
|
|
42561
42558
|
function _temp8(body) {
|
|
@@ -42802,6 +42799,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42802
42799
|
cacheKey: originalVideoCacheKey,
|
|
42803
42800
|
kind: 'original-video',
|
|
42804
42801
|
messageType: messageType,
|
|
42802
|
+
messageId: attachment.messageId,
|
|
42805
42803
|
size: Number(attachment.size) || 0
|
|
42806
42804
|
}).then(function (_ref4) {
|
|
42807
42805
|
var objectUrl = _ref4.objectUrl;
|
|
@@ -42864,6 +42862,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42864
42862
|
cacheKey: originalVideoCacheKey,
|
|
42865
42863
|
kind: 'original-video',
|
|
42866
42864
|
messageType: messageType,
|
|
42865
|
+
messageId: attachment.messageId,
|
|
42867
42866
|
size: Number(attachment.size) || 0
|
|
42868
42867
|
}).then(function (_ref5) {
|
|
42869
42868
|
var objectUrl = _ref5.objectUrl;
|
|
@@ -42897,6 +42896,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42897
42896
|
cacheKeys: [attachment.url + '_original_image_url'],
|
|
42898
42897
|
kind: 'original-image',
|
|
42899
42898
|
messageType: messageType,
|
|
42899
|
+
messageId: attachment.messageId,
|
|
42900
42900
|
size: Number(attachment.size) || 0
|
|
42901
42901
|
}).then(function (_ref6) {
|
|
42902
42902
|
var objectUrl = _ref6.objectUrl;
|
|
@@ -42958,6 +42958,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42958
42958
|
cacheKeys: [attachment.url + '_original_image_url'],
|
|
42959
42959
|
kind: 'original-image',
|
|
42960
42960
|
messageType: messageType,
|
|
42961
|
+
messageId: attachment.messageId,
|
|
42961
42962
|
size: Number(attachment.size) || 0
|
|
42962
42963
|
}).then(function (_ref7) {
|
|
42963
42964
|
var objectUrl = _ref7.objectUrl;
|
|
@@ -42997,6 +42998,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42997
42998
|
cacheKey: attachment.url,
|
|
42998
42999
|
kind: kind,
|
|
42999
43000
|
messageType: messageType,
|
|
43001
|
+
messageId: attachment.messageId,
|
|
43000
43002
|
size: Number(attachment.size) || 0
|
|
43001
43003
|
}).then(function (_ref8) {
|
|
43002
43004
|
var objectUrl = _ref8.objectUrl;
|
|
@@ -43027,7 +43029,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
43027
43029
|
total: progress.total || 0
|
|
43028
43030
|
});
|
|
43029
43031
|
setProgress(uploadPercent);
|
|
43030
|
-
}, messageType).then(function (url) {
|
|
43032
|
+
}, messageType, attachment.messageId).then(function (url) {
|
|
43031
43033
|
try {
|
|
43032
43034
|
var _temp20 = function _temp20() {
|
|
43033
43035
|
setAttachmentUrl(downloadingUrl);
|
|
@@ -45138,6 +45140,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
45138
45140
|
cacheKey: attachmentKey,
|
|
45139
45141
|
kind: kind,
|
|
45140
45142
|
messageType: messageType,
|
|
45143
|
+
messageId: currentFile === null || currentFile === void 0 ? void 0 : currentFile.messageId,
|
|
45141
45144
|
size: Number(currentFileSize) || 0
|
|
45142
45145
|
}).then(function (_ref3) {
|
|
45143
45146
|
var objectUrl = _ref3.objectUrl;
|
|
@@ -62846,6 +62849,7 @@ var startMediaVideoDownload = function startMediaVideoDownload(file) {
|
|
|
62846
62849
|
url: file.url,
|
|
62847
62850
|
cacheKey: originalVideo,
|
|
62848
62851
|
kind: 'original-video',
|
|
62852
|
+
messageId: file.messageId,
|
|
62849
62853
|
size: Number(file.size) || 0
|
|
62850
62854
|
});
|
|
62851
62855
|
};
|
|
@@ -63656,6 +63660,7 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
63656
63660
|
cacheKey: file.url,
|
|
63657
63661
|
kind: 'voice',
|
|
63658
63662
|
messageType: messageType,
|
|
63663
|
+
messageId: file.messageId,
|
|
63659
63664
|
size: Number(file.size) || 0
|
|
63660
63665
|
});
|
|
63661
63666
|
}).then(function (result) {
|
package/index.modern.js
CHANGED
|
@@ -11362,7 +11362,7 @@ var downloadFile = function downloadFile(attachment, download, done, progressCal
|
|
|
11362
11362
|
if (progressCallback) {
|
|
11363
11363
|
progressCallback(progress);
|
|
11364
11364
|
}
|
|
11365
|
-
}, messageType);
|
|
11365
|
+
}, messageType, attachment.messageId);
|
|
11366
11366
|
filesPromisesOnDownload[attachment.id] = urlPromise;
|
|
11367
11367
|
return Promise.resolve(urlPromise).then(function (result) {
|
|
11368
11368
|
FileSaver.saveAs(result.Body, attachment.name);
|
|
@@ -17735,7 +17735,7 @@ var download = function download(request, job) {
|
|
|
17735
17735
|
if (customDownloader) {
|
|
17736
17736
|
var _request$customDownlo;
|
|
17737
17737
|
var requestBlob = (_request$customDownlo = request.customDownload) != null ? _request$customDownlo : true;
|
|
17738
|
-
var customRequest = customDownloader(request.url, requestBlob, reportProgress, request.messageType);
|
|
17738
|
+
var customRequest = customDownloader(request.url, requestBlob, reportProgress, request.messageType, request.messageId);
|
|
17739
17739
|
job.customRequest = customRequest;
|
|
17740
17740
|
return Promise.resolve(customRequest).then(function (result) {
|
|
17741
17741
|
var body = (result === null || result === void 0 ? void 0 : result.Body) || result;
|
|
@@ -17934,7 +17934,7 @@ var getVideoAttachmentCacheKeys = function getVideoAttachmentCacheKeys(videoUrl,
|
|
|
17934
17934
|
originalVideo: videoUrl + "_original_video_url"
|
|
17935
17935
|
};
|
|
17936
17936
|
};
|
|
17937
|
-
var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, messageType) {
|
|
17937
|
+
var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, messageType, messageId) {
|
|
17938
17938
|
try {
|
|
17939
17939
|
return Promise.resolve(getAttachmentUrlFromCache(videoThumb)["catch"](function () {
|
|
17940
17940
|
return false;
|
|
@@ -17945,6 +17945,7 @@ var downloadVideoThumb = function downloadVideoThumb(videoThumb, downloader, mes
|
|
|
17945
17945
|
cacheKey: videoThumb,
|
|
17946
17946
|
kind: 'video-thumbnail',
|
|
17947
17947
|
messageType: messageType,
|
|
17948
|
+
messageId: messageId,
|
|
17948
17949
|
downloader: downloader,
|
|
17949
17950
|
customDownload: true,
|
|
17950
17951
|
skipCacheLookup: true
|
|
@@ -41998,9 +41999,15 @@ var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
|
41998
41999
|
var previousVideoSourceRef = useRef(undefined);
|
|
41999
42000
|
useEffect(function () {
|
|
42000
42001
|
if (!videoThumb || downloadedPreviewImage) return;
|
|
42002
|
+
var customDownloader = getCustomDownloader();
|
|
42003
|
+
var previewRequest = customDownloader && !file.messageId ? getAttachmentUrlFromCache(videoThumb)["catch"](function () {
|
|
42004
|
+
return false;
|
|
42005
|
+
}).then(function (cachedUrl) {
|
|
42006
|
+
return typeof cachedUrl === 'string' ? cachedUrl : undefined;
|
|
42007
|
+
}) : downloadVideoThumb(videoThumb, customDownloader, messageType, file.messageId);
|
|
42001
42008
|
var cancelled = false;
|
|
42002
|
-
|
|
42003
|
-
if (!cancelled) {
|
|
42009
|
+
previewRequest.then(function (localPreviewUrl) {
|
|
42010
|
+
if (!cancelled && localPreviewUrl) {
|
|
42004
42011
|
dispatch(setUpdateMessageAttachmentAC(videoThumb, localPreviewUrl));
|
|
42005
42012
|
}
|
|
42006
42013
|
})["catch"](function (error) {
|
|
@@ -42009,7 +42016,7 @@ var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
|
42009
42016
|
return function () {
|
|
42010
42017
|
cancelled = true;
|
|
42011
42018
|
};
|
|
42012
|
-
}, [videoThumb, downloadedPreviewImage, dispatch, messageType]);
|
|
42019
|
+
}, [videoThumb, downloadedPreviewImage, dispatch, messageType, file.messageId]);
|
|
42013
42020
|
useEffect(function () {
|
|
42014
42021
|
var videoSource = src;
|
|
42015
42022
|
var canExtractFirstFrame = shouldExtractVideoFirstFrame(file.metadata);
|
|
@@ -42154,7 +42161,7 @@ var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
|
42154
42161
|
messageTimeBackgroundColor: overlayBackground2
|
|
42155
42162
|
}, !isRepliedMessage && !isPreview && /*#__PURE__*/React__default.createElement(SvgVideoCall, null), videoCurrentTime))));
|
|
42156
42163
|
}, function (prev, next) {
|
|
42157
|
-
return prev.src === next.src && prev.file.id === next.file.id && prev.file.url === next.file.url && prev.file.metadata === next.file.metadata && prev.uploading === next.uploading && prev.downloading === next.downloading && prev.width === next.width && prev.height === next.height && prev.borderRadius === next.borderRadius && prev.isRepliedMessage === next.isRepliedMessage && prev.isDetailsView === next.isDetailsView;
|
|
42164
|
+
return prev.src === next.src && prev.file.id === next.file.id && prev.file.messageId === next.file.messageId && prev.messageType === next.messageType && prev.file.url === next.file.url && prev.file.metadata === next.file.metadata && prev.uploading === next.uploading && prev.downloading === next.downloading && prev.width === next.width && prev.height === next.height && prev.borderRadius === next.borderRadius && prev.isRepliedMessage === next.isRepliedMessage && prev.isDetailsView === next.isDetailsView;
|
|
42158
42165
|
});
|
|
42159
42166
|
var VideoControls = styled.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 6;\n"])));
|
|
42160
42167
|
var VideoTime = styled.div(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: ", ";\n font-size: ", ";\n display: flex;\n align-items: center;\n border-radius: 16px;\n padding: ", ";\n background-color: ", ";\n line-height: 14px;\n color: ", ";\n z-index: 10;\n\n & > svg {\n color: ", ";\n margin-right: 4px;\n }\n"])), function (props) {
|
|
@@ -42436,17 +42443,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42436
42443
|
if (downloadIsCancelled) {
|
|
42437
42444
|
setDownloadIsCancelled(false);
|
|
42438
42445
|
if (customDownloader) {
|
|
42439
|
-
|
|
42440
|
-
var loadedRes = progress.loaded && progress.loaded / progress.total;
|
|
42441
|
-
var uploadPercent = loadedRes && loadedRes * 100;
|
|
42442
|
-
setSizeProgress({
|
|
42443
|
-
loaded: progress.loaded || 0,
|
|
42444
|
-
total: progress.total || 0
|
|
42445
|
-
});
|
|
42446
|
-
setProgress(uploadPercent);
|
|
42447
|
-
}, messageType).then(function (url) {
|
|
42448
|
-
downloadImage(url);
|
|
42449
|
-
});
|
|
42446
|
+
handleResumeOriginalImageDownload(e);
|
|
42450
42447
|
} else {
|
|
42451
42448
|
downloadImage(attachment.url);
|
|
42452
42449
|
}
|
|
@@ -42536,7 +42533,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42536
42533
|
total: progress.total || 0
|
|
42537
42534
|
});
|
|
42538
42535
|
setProgress(uploadPercent);
|
|
42539
|
-
}, messageType);
|
|
42536
|
+
}, messageType, attachment.messageId);
|
|
42540
42537
|
setDownloadFilePromise(attachment.id, urlPromise);
|
|
42541
42538
|
return Promise.resolve(urlPromise).then(function (result) {
|
|
42542
42539
|
function _temp8(body) {
|
|
@@ -42783,6 +42780,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42783
42780
|
cacheKey: originalVideoCacheKey,
|
|
42784
42781
|
kind: 'original-video',
|
|
42785
42782
|
messageType: messageType,
|
|
42783
|
+
messageId: attachment.messageId,
|
|
42786
42784
|
size: Number(attachment.size) || 0
|
|
42787
42785
|
}).then(function (_ref4) {
|
|
42788
42786
|
var objectUrl = _ref4.objectUrl;
|
|
@@ -42845,6 +42843,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42845
42843
|
cacheKey: originalVideoCacheKey,
|
|
42846
42844
|
kind: 'original-video',
|
|
42847
42845
|
messageType: messageType,
|
|
42846
|
+
messageId: attachment.messageId,
|
|
42848
42847
|
size: Number(attachment.size) || 0
|
|
42849
42848
|
}).then(function (_ref5) {
|
|
42850
42849
|
var objectUrl = _ref5.objectUrl;
|
|
@@ -42878,6 +42877,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42878
42877
|
cacheKeys: [attachment.url + '_original_image_url'],
|
|
42879
42878
|
kind: 'original-image',
|
|
42880
42879
|
messageType: messageType,
|
|
42880
|
+
messageId: attachment.messageId,
|
|
42881
42881
|
size: Number(attachment.size) || 0
|
|
42882
42882
|
}).then(function (_ref6) {
|
|
42883
42883
|
var objectUrl = _ref6.objectUrl;
|
|
@@ -42939,6 +42939,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42939
42939
|
cacheKeys: [attachment.url + '_original_image_url'],
|
|
42940
42940
|
kind: 'original-image',
|
|
42941
42941
|
messageType: messageType,
|
|
42942
|
+
messageId: attachment.messageId,
|
|
42942
42943
|
size: Number(attachment.size) || 0
|
|
42943
42944
|
}).then(function (_ref7) {
|
|
42944
42945
|
var objectUrl = _ref7.objectUrl;
|
|
@@ -42978,6 +42979,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
42978
42979
|
cacheKey: attachment.url,
|
|
42979
42980
|
kind: kind,
|
|
42980
42981
|
messageType: messageType,
|
|
42982
|
+
messageId: attachment.messageId,
|
|
42981
42983
|
size: Number(attachment.size) || 0
|
|
42982
42984
|
}).then(function (_ref8) {
|
|
42983
42985
|
var objectUrl = _ref8.objectUrl;
|
|
@@ -43008,7 +43010,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
43008
43010
|
total: progress.total || 0
|
|
43009
43011
|
});
|
|
43010
43012
|
setProgress(uploadPercent);
|
|
43011
|
-
}, messageType).then(function (url) {
|
|
43013
|
+
}, messageType, attachment.messageId).then(function (url) {
|
|
43012
43014
|
try {
|
|
43013
43015
|
var _temp20 = function _temp20() {
|
|
43014
43016
|
setAttachmentUrl(downloadingUrl);
|
|
@@ -45119,6 +45121,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
45119
45121
|
cacheKey: attachmentKey,
|
|
45120
45122
|
kind: kind,
|
|
45121
45123
|
messageType: messageType,
|
|
45124
|
+
messageId: currentFile === null || currentFile === void 0 ? void 0 : currentFile.messageId,
|
|
45122
45125
|
size: Number(currentFileSize) || 0
|
|
45123
45126
|
}).then(function (_ref3) {
|
|
45124
45127
|
var objectUrl = _ref3.objectUrl;
|
|
@@ -62827,6 +62830,7 @@ var startMediaVideoDownload = function startMediaVideoDownload(file) {
|
|
|
62827
62830
|
url: file.url,
|
|
62828
62831
|
cacheKey: originalVideo,
|
|
62829
62832
|
kind: 'original-video',
|
|
62833
|
+
messageId: file.messageId,
|
|
62830
62834
|
size: Number(file.size) || 0
|
|
62831
62835
|
});
|
|
62832
62836
|
};
|
|
@@ -63637,6 +63641,7 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
63637
63641
|
cacheKey: file.url,
|
|
63638
63642
|
kind: 'voice',
|
|
63639
63643
|
messageType: messageType,
|
|
63644
|
+
messageId: file.messageId,
|
|
63640
63645
|
size: Number(file.size) || 0
|
|
63641
63646
|
});
|
|
63642
63647
|
}).then(function (result) {
|