refactor: centralize main session key normalization in apps
This commit is contained in:
8
apps/ios/Sources/SessionKey.swift
Normal file
8
apps/ios/Sources/SessionKey.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
import Foundation
|
||||
|
||||
enum SessionKey {
|
||||
static func normalizeMainKey(_ raw: String?) -> String {
|
||||
let trimmed = (raw ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
return trimmed.isEmpty ? "main" : trimmed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user