From 9f98a2efd9d43b2499b2d2e58aec296e5b9353a8 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 8 Mar 2021 16:43:37 +0100 Subject: [PATCH] Export conversations logo --- assets/js/components/account/export/worker.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/assets/js/components/account/export/worker.js b/assets/js/components/account/export/worker.js index e00ccaa3..aa9f9108 100644 --- a/assets/js/components/account/export/worker.js +++ b/assets/js/components/account/export/worker.js @@ -197,12 +197,22 @@ ComunicWeb.components.account.export.worker = { post.comments.forEach(parseComment); } + /** + * Parse a conversation to find potential files to download + * + * @param {Conversation} info Information about the conversation message to parse + */ + const parseConversation = function(info){ + if(info.logo != null) + files.add(info.logo); + } + /** * Parse a conversation message to find potential files to download * * @param {ConversationMessage} info Information about the conversation message to parse */ - var parseConversationMessage = function(info){ + const parseConversationMessage = function(info){ if(info.file != null) { files.add(info.file.url); @@ -222,6 +232,9 @@ ComunicWeb.components.account.export.worker = { //Comments data.comments.forEach(parseComment); + // Conversations list + data.conversations_list.forEach(parseConversation); + //Conversation message //* All from users data.all_conversation_messages.forEach(parseConversationMessage);