folder/IMAP: savemessage() should just save flags if uid already exists
As the LocalStatus and UIDMap backend already did: If the uid already exists for savemessage(), only modify the flags and don't append a new message. We don't invoke savemessage() on messages that already exist in our sync logic, so this has no change on our current behavior. But it makes backends befave more consistent with each other. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
dc3ad723c9
commit
fd28c5a2d3
@ -394,6 +394,11 @@ class IMAPFolder(BaseFolder):
|
|||||||
server. If the folder is read-only it will return 0."""
|
server. If the folder is read-only it will return 0."""
|
||||||
self.ui.debug('imap', 'savemessage: called')
|
self.ui.debug('imap', 'savemessage: called')
|
||||||
|
|
||||||
|
# already have it, just save modified flags
|
||||||
|
if uid > 0 and uid in self.messagelist:
|
||||||
|
self.savemessageflags(uid, flags)
|
||||||
|
return uid
|
||||||
|
|
||||||
try:
|
try:
|
||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user