mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
85f28d017d
* Update the SDK and handle API breaks. * Rename sdkUserThing to rustUserThing for consistency. * Add user status ClientProxy methods. * Rename UserStatus.UserSet to UserStatus.Raw.
62 lines
1.9 KiB
Swift
62 lines
1.9 KiB
Swift
//
|
|
// Copyright 2025 Element Creations Ltd.
|
|
// Copyright 2023-2025 New Vector Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
|
// Please see LICENSE files in the repository root for full details.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension UserProfile {
|
|
static var mockAlice: UserProfile {
|
|
.init(userID: "@alice:matrix.org", displayName: "Alice", avatarURL: "mxc://matrix.org/UcCimidcvpFvWkPzvjXMQPHA")
|
|
}
|
|
|
|
static var mockBob: UserProfile {
|
|
.init(userID: "@bob:matrix.org", displayName: "Bob", avatarURL: nil)
|
|
}
|
|
|
|
static var mockBobby: UserProfile {
|
|
.init(userID: "@bobby:matrix.org", displayName: "Bobby", avatarURL: nil)
|
|
}
|
|
|
|
static var mockCharlie: UserProfile {
|
|
.init(userID: "@charlie:matrix.org", displayName: "Charlie", avatarURL: nil)
|
|
}
|
|
|
|
static var mockDan: UserProfile {
|
|
.init(userID: "@dan:matrix.org", displayName: "Dan", avatarURL: .mockMXCUserAvatar)
|
|
}
|
|
|
|
static var mockErin: UserProfile {
|
|
.init(userID: "@erin:matrix.org", displayName: "Erin", status: .mockFocussing)
|
|
}
|
|
|
|
static var mockFrank: UserProfile {
|
|
.init(userID: "@frank:matrix.org", displayName: "Frank", status: .mockCall)
|
|
}
|
|
|
|
static var mockVerbose: UserProfile {
|
|
.init(userID: "@charlie:matrix.org", displayName: "Charlie is the best display name", avatarURL: nil)
|
|
}
|
|
}
|
|
|
|
nonisolated extension UserStatus {
|
|
static var mockCall: UserStatus {
|
|
.init(raw: nil, call: .init(joinedDate: nil))
|
|
}
|
|
|
|
static var mockFocussing: UserStatus {
|
|
.init(raw: .init(text: "Focussing", emoji: "🧑💻"), call: nil)
|
|
}
|
|
|
|
static var mockHoliday: UserStatus {
|
|
.init(raw: .init(text: "Holiday", emoji: "🏝️"), call: nil)
|
|
}
|
|
|
|
static func mock(text: String, emoji: Character) -> UserStatus {
|
|
.init(raw: .init(text: text, emoji: emoji), call: nil)
|
|
}
|
|
}
|