Build error and redundant variable removal

pull/894/head
Morgan Pretty 3 months ago
parent 16addb3b91
commit bcbe7ec11c

@ -506,11 +506,8 @@ extension LibSession.Config {
} }
} }
public func isAdmin(groupSessionId: SessionId) -> Bool { public func isAdmin() -> Bool {
guard guard case .groupKeys(let conf, _, _) = self else { return false }
groupSessionId.prefix == .group,
case .groupKeys(let conf, _, _) = self
else { return false }
return groups_keys_is_admin(conf) return groups_keys_is_admin(conf)
} }

@ -864,7 +864,7 @@ public extension LibSession {
return false return false
} }
return config.isAdmin(groupSessionId: groupSessionId) return config.isAdmin()
} }
} }
} }

@ -378,7 +378,7 @@ open class Storage {
// Note: The non-async migration should only be used for unit tests // Note: The non-async migration should only be used for unit tests
guard async else { return migrationCompleted(Result(catching: { try migrator.migrate(dbWriter) })) } 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<Void, Error> = { let finalResult: Result<Void, Error> = {
switch result { switch result {
case .failure(let error): return .failure(error) case .failure(let error): return .failure(error)

Loading…
Cancel
Save