Skip to content

Commit e894e94

Browse files
MRN-906
1 parent f466ba9 commit e894e94

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/hooks/useMediaProgress.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,25 +136,28 @@ const useMediaProgress = ({ uploadStatus = 0, downloadStatus = 0, msgId }) => {
136136
showToast('Please check your internet connection');
137137
return;
138138
}
139+
if (getBlockedStatus(userId)) {
140+
promptUnblockModal();
141+
return;
142+
}
143+
139144
await updateProgressNotification({
140145
msgId,
141146
progress: 0,
142147
type: 'upload',
143148
isCanceled: false,
144149
foregroundStatus: false,
145150
});
146-
const retryObj = {
147-
msgId,
148-
userId,
149-
is_uploading: 1,
150-
};
151+
152+
const retryObj = { msgId, userId, is_uploading: 1 };
151153
const { msgId: _msgId, msgBody: { media = {} } = {} } = chatMessage;
152154
const updatedFile = {
153155
...media.file,
154156
fileDetails: mediaObjContructor('REDUX', media),
155157
};
156158
const _file = media.file || updatedFile;
157159
dispatch(updateMediaStatus(retryObj));
160+
158161
uploadFileToSDK(_file, chatUser, _msgId, media);
159162
};
160163

0 commit comments

Comments
 (0)