Fix potentially duplicated requests

This commit is contained in:
Niels Andriesse 2021-04-22 09:24:11 +10:00
parent 583f5e3483
commit b85edbe900
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ public final class OpenGroupAPIV2 : NSObject {
// we provided a valid token but it doesn't have a high enough permission level for the route in question.
if case OnionRequestAPI.Error.httpRequestFailedAtDestination(let statusCode, _) = error, statusCode == 401 {
let storage = SNMessagingKitConfiguration.shared.storage
storage.write { transaction in
storage.writeSync { transaction in
storage.removeAuthToken(for: room, on: request.server, using: transaction)
}
}