Adop the new SDK permalink detector and user builder

This commit is contained in:
Stefan Ceriu
2024-04-12 13:26:41 +03:00
committed by Stefan Ceriu
parent f8920d4d11
commit fcc25dd441
26 changed files with 201 additions and 483 deletions
@@ -36,21 +36,29 @@ enum RoomAliasAttribute: AttributedStringKey {
static var name = "MXRoomAliasAttribute"
}
enum EventOnRoomIDAttribute: AttributedStringKey {
struct Value: Hashable {
let roomID: String
let eventID: String
}
static var name = "MXEventOnRoomIDAttribute"
}
enum EventOnRoomAliasAttribute: AttributedStringKey {
struct Value: Hashable {
let alias: String
let eventID: String
}
static var name = "MXEventOnRoomAliasAttribute"
}
enum AllUsersMentionAttribute: AttributedStringKey {
typealias Value = Bool
static var name = "MXAllUsersMentionAttribute"
}
struct EventIDAttributeValue: Hashable {
let roomID: String
let eventID: String
}
enum EventIDAttribute: AttributedStringKey {
typealias Value = EventIDAttributeValue
static var name = "MXEventIDAttribute"
}
// periphery: ignore - required to make NSAttributedString to AttributedString conversion even if not used directly
extension AttributeScopes {
struct ElementXAttributes: AttributeScope {
@@ -59,7 +67,8 @@ extension AttributeScopes {
let userID: UserIDAttribute
let roomID: RoomIDAttribute
let roomAlias: RoomAliasAttribute
let eventID: EventIDAttribute
let eventOnRoomID: EventOnRoomIDAttribute
let eventOnRoomAlias: EventOnRoomAliasAttribute
let allUsersMention: AllUsersMentionAttribute