From 3a7517ec640bea366dcc0bce4e59c6cd8b8a2fb7 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Fri, 17 Mar 2023 15:10:55 +1100 Subject: [PATCH] fail the group leaving job permanently if there is no thread or closed group record --- SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift b/SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift index b255dc783..349938f3e 100644 --- a/SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift +++ b/SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift @@ -30,12 +30,12 @@ public enum GroupLeavingJob: JobExecutor { guard let thread: SessionThread = Storage.shared.read({ db in try? SessionThread.fetchOne(db, id: details.groupPublicKey)}) else { SNLog("Can't leave nonexistent closed group.") - failure(job, MessageSenderError.noThread, false) + failure(job, MessageSenderError.noThread, true) return } guard let closedGroup: ClosedGroup = Storage.shared.read({ db in try? thread.closedGroup.fetchOne(db)}) else { - failure(job, MessageSenderError.invalidClosedGroupUpdate, false) + failure(job, MessageSenderError.invalidClosedGroupUpdate, true) return }