Added download error type information to notifications and downloads (currently unused)

This commit is contained in:
Tzahi12345
2023-01-29 15:55:05 -05:00
parent 6010d991fb
commit 0f7c495595
3 changed files with 14 additions and 10 deletions

View File

@@ -64,9 +64,9 @@ exports.sendDownloadNotification = async (file, user_uid) => {
return await exports.sendNotification(notification);
}
exports.sendDownloadErrorNotification = async (download, user_uid) => {
exports.sendDownloadErrorNotification = async (download, user_uid, error_type = null) => {
if (!notificationEnabled('download_error')) return;
const data = {download_uid: download.uid, download_url: download.url};
const data = {download_uid: download.uid, download_url: download.url, download_error_type: error_type};
const notification = exports.createNotification('download_error', ['view_download_error', 'retry_download'], data, user_uid);
return await exports.sendNotification(notification);
}