|
|
@ -3,6 +3,7 @@
|
|
|
|
import Foundation
|
|
|
|
import Foundation
|
|
|
|
import Combine
|
|
|
|
import Combine
|
|
|
|
import GRDB
|
|
|
|
import GRDB
|
|
|
|
|
|
|
|
import SessionUtil
|
|
|
|
import SessionUIKit
|
|
|
|
import SessionUIKit
|
|
|
|
import SessionUtilitiesKit
|
|
|
|
import SessionUtilitiesKit
|
|
|
|
import SessionSnodeKit
|
|
|
|
import SessionSnodeKit
|
|
|
@ -68,7 +69,7 @@ public enum ProcessPendingGroupMemberRemovalsJob: JobExecutor {
|
|
|
|
|
|
|
|
|
|
|
|
/// If there are no pending removals then we can just complete
|
|
|
|
/// If there are no pending removals then we can just complete
|
|
|
|
guard
|
|
|
|
guard
|
|
|
|
let pendingRemovals: [String: Bool] = try? LibSession.getPendingMemberRemovals(
|
|
|
|
let pendingRemovals: [String: GROUP_MEMBER_STATUS] = try? LibSession.getPendingMemberRemovals(
|
|
|
|
groupSessionId: groupSessionId,
|
|
|
|
groupSessionId: groupSessionId,
|
|
|
|
using: dependencies
|
|
|
|
using: dependencies
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -87,7 +88,7 @@ public enum ProcessPendingGroupMemberRemovalsJob: JobExecutor {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
let messageSendTimestamp: Int64 = dependencies[cache: .snodeAPI].currentOffsetTimestampMs()
|
|
|
|
let messageSendTimestamp: Int64 = dependencies[cache: .snodeAPI].currentOffsetTimestampMs()
|
|
|
|
let memberIdsToRemoveContent: Set<String> = pendingRemovals
|
|
|
|
let memberIdsToRemoveContent: Set<String> = pendingRemovals
|
|
|
|
.filter { _, shouldRemoveContent -> Bool in shouldRemoveContent }
|
|
|
|
.filter { _, status -> Bool in status == GROUP_MEMBER_STATUS_REMOVED_MEMBER_AND_MESSAGES }
|
|
|
|
.map { memberId, _ -> String in memberId }
|
|
|
|
.map { memberId, _ -> String in memberId }
|
|
|
|
.asSet()
|
|
|
|
.asSet()
|
|
|
|
|
|
|
|
|
|
|
|