From 07abe2639fa8a98164f70c065036431714b9ddcb Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 1 Sep 2017 07:33:30 -0700 Subject: [PATCH] Export: Properly generate directory names for nameless groups (#1421) FREEBIE --- js/backup.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/js/backup.js b/js/backup.js index 4e70b3c83..320894806 100644 --- a/js/backup.js +++ b/js/backup.js @@ -404,25 +404,13 @@ // 1. Human-readable, for easy use and verification by user (names not just ids) // 2. Sorted just like the list of conversations in the left-pan (active_at) // 3. Disambiguated from other directories (active_at, truncated name, id) - function getPrivateConversationDirName(conversation) { + function getConversationDirName(conversation) { + var name = conversation.active_at || 'never'; if (conversation.name) { return ' (' + conversation.name.slice(0, 30) + ' ' + conversation.id + ')'; } else { return ' (' + conversation.id + ')'; } - } - - function getGroupConversationDirName(conversation) { - return ' (' + conversation.name.slice(0, 30) + ' ' + conversation.id + ')'; - } - - function getConversationDirName(conversation) { - var name = conversation.active_at || 'never'; - if (conversation.type === 'private') { - name += getPrivateConversationDirName(conversation); - } else { - name += getGroupConversationDirName(conversation); - } return name; }