diff --git a/SessionMessagingKit/LibSession/Config Handling/LibSession+Shared.swift b/SessionMessagingKit/LibSession/Config Handling/LibSession+Shared.swift index 5a3e54d67..7685d49ff 100644 --- a/SessionMessagingKit/LibSession/Config Handling/LibSession+Shared.swift +++ b/SessionMessagingKit/LibSession/Config Handling/LibSession+Shared.swift @@ -506,11 +506,8 @@ extension LibSession.Config { } } - public func isAdmin(groupSessionId: SessionId) -> Bool { - guard - groupSessionId.prefix == .group, - case .groupKeys(let conf, _, _) = self - else { return false } + public func isAdmin() -> Bool { + guard case .groupKeys(let conf, _, _) = self else { return false } return groups_keys_is_admin(conf) } diff --git a/SessionMessagingKit/LibSession/LibSession+SessionMessagingKit.swift b/SessionMessagingKit/LibSession/LibSession+SessionMessagingKit.swift index 76c605339..d8bd5d633 100644 --- a/SessionMessagingKit/LibSession/LibSession+SessionMessagingKit.swift +++ b/SessionMessagingKit/LibSession/LibSession+SessionMessagingKit.swift @@ -864,7 +864,7 @@ public extension LibSession { return false } - return config.isAdmin(groupSessionId: groupSessionId) + return config.isAdmin() } } } diff --git a/SessionUtilitiesKit/Database/Storage.swift b/SessionUtilitiesKit/Database/Storage.swift index c1deeb612..8fb43245f 100644 --- a/SessionUtilitiesKit/Database/Storage.swift +++ b/SessionUtilitiesKit/Database/Storage.swift @@ -378,7 +378,7 @@ open class Storage { // Note: The non-async migration should only be used for unit tests guard async else { return migrationCompleted(Result(catching: { try migrator.migrate(dbWriter) })) } - migrator.asyncMigrate(dbWriter) { result in + migrator.asyncMigrate(dbWriter) { [dependencies] result in let finalResult: Result = { switch result { case .failure(let error): return .failure(error)