Merge pull request #15117 from gabriellpr/export-chat-bug

fix: missing "chat has been cleared" message at chat export
This commit is contained in:
Ramón Souza 2022-06-14 15:17:38 +01:00 committed by GitHub
commit 441e275f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ const SYSTEM_CHAT_TYPE = CHAT_CONFIG.type_system;
const PUBLIC_CHAT_ID = CHAT_CONFIG.public_id;
const PUBLIC_GROUP_CHAT_ID = CHAT_CONFIG.public_group_id;
const PUBLIC_CHAT_CLEAR = CHAT_CONFIG.chat_clear;
const PUBLIC_CHAT_CLEAR = CHAT_CONFIG.system_messages_keys.chat_clear;
const CHAT_POLL_RESULTS_MESSAGE = CHAT_CONFIG.system_messages_keys.chat_poll_result;
const ROLE_MODERATOR = Meteor.settings.public.user.role_moderator;
@ -270,7 +270,7 @@ const exportChat = (timeWindowList, intl) => {
: `${timeWindow.senderName}: `;
let messageText = '';
if (message.text === PUBLIC_CHAT_CLEAR) {
message.text = intl.formatMessage(intlMessages.publicChatClear);
messageText = intl.formatMessage(intlMessages.publicChatClear);
} else if (message.id.includes(CHAT_POLL_RESULTS_MESSAGE)) {
userName = `${intl.formatMessage(intlMessages.pollResult)}:\n`;
const { pollResultData } = timeWindow.extra;