Skip to content

Commit cb632fe

Browse files
authored
Merge pull request #177 from Dimillian/remove-update
2 parents c25cb86 + a817ae7 commit cb632fe

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

Sources/ATProtoKit/APIReference/SessionManager/SessionConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ extension SessionConfiguration {
368368
pdsURL: self.pdsURL
369369
)
370370

371-
_ = await UserSessionRegistry.shared.update(instanceUUID, with: updatedUserSession)
371+
_ = await UserSessionRegistry.shared.register(instanceUUID, session: updatedUserSession)
372372
} catch {
373373
throw error
374374
}
@@ -451,7 +451,7 @@ extension SessionConfiguration {
451451
pdsURL: self.pdsURL
452452
)
453453

454-
_ = await UserSessionRegistry.shared.update(instanceUUID, with: updatedUserSession)
454+
_ = await UserSessionRegistry.shared.register(instanceUUID, session: updatedUserSession)
455455
} catch {
456456
throw error
457457
}

Sources/ATProtoKit/APIReference/SessionManager/UserSessionRegistry.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,6 @@ public actor UserSessionRegistry {
4848
return sessions.keys.contains(id)
4949
}
5050

51-
/// Updates an existing instance of `UserSession` with a new instance.
52-
///
53-
/// - Parameters:
54-
/// - id: The UUID of the existing session to update.
55-
/// - newSession: The updated `UserSession` instance.
56-
/// - Returns: `true` if the update succeeded, `false` if the session didn’t exist.
57-
public func update(_ id: UUID, with newSession: UserSession) -> Bool {
58-
guard sessions.keys.contains(id) else {
59-
return false
60-
}
61-
62-
sessions[id] = newSession
63-
return true
64-
}
65-
6651
/// Removes a specific user session by UUID.
6752
///
6853
/// - Parameter id: The UUID of the session to remove.

0 commit comments

Comments
 (0)