Export conversations logo

This commit is contained in:
Pierre HUBERT 2021-03-08 16:43:37 +01:00
parent 824759627f
commit 9f98a2efd9

View File

@ -197,12 +197,22 @@ ComunicWeb.components.account.export.worker = {
post.comments.forEach(parseComment); 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 * Parse a conversation message to find potential files to download
* *
* @param {ConversationMessage} info Information about the conversation message to parse * @param {ConversationMessage} info Information about the conversation message to parse
*/ */
var parseConversationMessage = function(info){ const parseConversationMessage = function(info){
if(info.file != null) if(info.file != null)
{ {
files.add(info.file.url); files.add(info.file.url);
@ -222,6 +232,9 @@ ComunicWeb.components.account.export.worker = {
//Comments //Comments
data.comments.forEach(parseComment); data.comments.forEach(parseComment);
// Conversations list
data.conversations_list.forEach(parseConversation);
//Conversation message //Conversation message
//* All from users //* All from users
data.all_conversation_messages.forEach(parseConversationMessage); data.all_conversation_messages.forEach(parseConversationMessage);