From 76930202ef57a6820c7c132fe880c00ae59146e4 Mon Sep 17 00:00:00 2001 From: Matheus Marsiglio Date: Fri, 8 May 2020 17:40:50 -0300 Subject: [PATCH] [FIX] Error during data export for DMs (#17577) --- app/user-data-download/server/cronProcessDownloads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/user-data-download/server/cronProcessDownloads.js b/app/user-data-download/server/cronProcessDownloads.js index 7e841839f84c..02bdcc39707f 100644 --- a/app/user-data-download/server/cronProcessDownloads.js +++ b/app/user-data-download/server/cronProcessDownloads.js @@ -47,7 +47,7 @@ const loadUserSubscriptions = function(exportOperation) { const roomId = subscription.rid; const roomData = Rooms.findOneById(roomId); const roomName = roomData && roomData.name && subscription.t !== 'd' ? roomData.name : roomId; - const [userId] = subscription.t === 'd' ? roomId.uids.filter((uid) => uid !== exportUserId) : [null]; + const [userId] = subscription.t === 'd' ? roomData.uids.filter((uid) => uid !== exportUserId) : [null]; const fileName = exportOperation.fullExport ? roomId : roomName; const fileType = exportOperation.fullExport ? 'json' : 'html'; const targetFile = `${ fileName }.${ fileType }`;