34 lines
869 B
Swift
34 lines
869 B
Swift
import Foundation
|
|
|
|
/// The user's own local identity and preferences.
|
|
///
|
|
/// Deliberately minimal: Proximity collects the *least* data needed to connect
|
|
/// humans. There is no profile photo, no bio, no social graph import.
|
|
struct UserProfile: Codable {
|
|
var id: UUID
|
|
var displayName: String
|
|
var publicKey: Data
|
|
|
|
/// Master "open to connection" state.
|
|
var isOpenToConnect: Bool
|
|
|
|
/// Preferred radius tier.
|
|
var radiusTier: DistanceTier
|
|
|
|
/// When true, the user is present but invisible to others.
|
|
var isIncognito: Bool
|
|
|
|
/// When true, the user is not discoverable at all.
|
|
var isBlocked: Bool
|
|
|
|
static let empty = UserProfile(
|
|
id: UUID(),
|
|
displayName: "",
|
|
publicKey: Data(),
|
|
isOpenToConnect: false,
|
|
radiusTier: .rightHere,
|
|
isIncognito: false,
|
|
isBlocked: false
|
|
)
|
|
}
|