ignore MessageAppend all together for all new message notifications, as Sieve moved mails still use MessageNew

This commit is contained in:
Ralf Becker 2020-08-06 14:46:28 +02:00
parent 879943f3d2
commit 19b8cb25a8

View File

@ -425,9 +425,9 @@ app.classes.mail = AppJS.extend(
} }
// notify user a new mail arrived // notify user a new mail arrived
if (pushData.type === 'add') if (pushData.type === 'add' && pushData.acl.event === 'MessageNew')
{ {
// never notify for Trash, Junk, Drafts or Sent folder // never notify for Trash, Junk, Drafts or Sent folder (user might use Sieve to move mails there!)
if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts|Sent)$/)) return; if (pushData.acl.folder.match(/^(INBOX.)?(Trash|Spam|Junk|Drafts|Sent)$/)) return;
// increment notification counter on (closed) mail tab // increment notification counter on (closed) mail tab
let framework = egw_getFramework(); let framework = egw_getFramework();