fix(mail): Store the Deleted flag in the correct (source) mailbox when moving mails across mailboxes

This commit is contained in:
Johannes Kanefendt
2023-03-10 15:57:53 +01:00
parent c178963bfc
commit a556e742fb

View File

@@ -794,7 +794,7 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSDictionary *
if ([result isKindOfClass: [NSArray class]] && [result count] > 0)
{
// Copy each message to the other account
client = [[account imap4Connection] client];
NGImap4Client *dstClient = [[account imap4Connection] client];
[[account imap4Connection] selectFolder: imapDestinationFolder];
messages = [result objectEnumerator];
result = nil;
@@ -803,7 +803,7 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSDictionary *
if ((content = [message valueForKey: @"message"]) != nil)
{
flags = [message valueForKey: @"flags"];
result = [client append: content toFolder: imapDestinationFolder withFlags: flags];
result = [dstClient append: content toFolder: imapDestinationFolder withFlags: flags];
if ([[result objectForKey: @"result"] boolValue])
result = nil;
else