Message from, to, cc, bcc, replyTo and deliveredTo to the new EmailCollectionModel

This commit is contained in:
djmaze 2020-09-15 09:43:53 +02:00
parent b904eca98e
commit 062f8d078e
4 changed files with 100 additions and 128 deletions

View file

@ -27,7 +27,7 @@ import { MESSAGE_BODY_CACHE_LIMIT } from 'Common/Consts';
import { mailBox, notificationMailIcon } from 'Common/Links';
import { i18n, getNotification } from 'Common/Translator';
import * as MessageHelper from 'Helper/Message';
import { EmailCollectionModel } from 'Model/EmailCollection';
import { MessageModel } from 'Model/Message';
import { setHash } from 'Knoin/Knoin';
@ -259,7 +259,7 @@ class MessageUserStore {
newMessages.forEach(item => {
NotificationStore.displayDesktopNotification(
notificationMailIcon(),
MessageHelper.emailArrayToString(MessageHelper.emailArrayFromJson(item.From), false),
EmailCollectionModel.reviveFromJson(item.From).toString(),
item.Subject,
{ 'Folder': item.Folder, 'Uid': item.Uid }
);