mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
imapserver: implement NOTIFY extension from RFC 5465
NOTIFY is like IDLE, but where IDLE watches just the selected mailbox, NOTIFY can watch all mailboxes. With NOTIFY, a client can also ask a server to immediately return configurable fetch attributes for new messages, e.g. a message preview, certain header fields, or simply the entire message. Mild testing with evolution and fairemail.
This commit is contained in:
@ -558,7 +558,7 @@ func importMessages(ctx context.Context, log mlog.Log, token string, acc *store.
|
||||
return
|
||||
}
|
||||
newIDs = append(newIDs, m.ID)
|
||||
changes = append(changes, m.ChangeAddUID())
|
||||
changes = append(changes, m.ChangeAddUID(*mb))
|
||||
messages[mb.Name]++
|
||||
if messages[mb.Name]%100 == 0 || prevMailbox != mb.Name {
|
||||
prevMailbox = mb.Name
|
||||
@ -767,7 +767,7 @@ func importMessages(ctx context.Context, log mlog.Log, token string, acc *store.
|
||||
}
|
||||
err = tx.Update(&m)
|
||||
ximportcheckf(err, "updating message after flag update")
|
||||
changes = append(changes, m.ChangeFlags(oflags))
|
||||
changes = append(changes, m.ChangeFlags(oflags, *mb))
|
||||
}
|
||||
delete(mailboxMissingKeywordMessages, mailbox)
|
||||
}
|
||||
|
Reference in New Issue
Block a user