mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 15:42:10 +03:00
update_server_uid: set server_uid even for unlinked messages
Sometimes message deletion job marks message as unlinked without actually deleting it. It is possible if the message was already moved into another folder, possibly by second device, but not detected there yet. It should be detected later in the other folder, and the server_uid in the database should be set. Since introduction of add_imap_deletion_jobs() any expired message record will be marked as unlinked eventually, because another message deletion job will be scheduled even if update_server_uid() resurrects the message once.
This commit is contained in:
@@ -1417,8 +1417,8 @@ pub fn update_server_uid(
|
||||
server_uid: u32,
|
||||
) {
|
||||
match context.sql.execute(
|
||||
"UPDATE msgs SET server_folder=?, server_uid=? \
|
||||
WHERE rfc724_mid=? AND NOT unlinked",
|
||||
"UPDATE msgs SET server_folder=?, server_uid=?, unlinked=0 \
|
||||
WHERE rfc724_mid=?",
|
||||
params![server_folder.as_ref(), server_uid, rfc724_mid],
|
||||
) {
|
||||
Ok(_) => {}
|
||||
|
||||
Reference in New Issue
Block a user