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
@@ -681,7 +681,6 @@ class ClientProxy: ClientProxyProtocol {
let roomListService = syncService.roomListService()
let roomMessageEventStringBuilder = RoomMessageEventStringBuilder(attributedStringBuilder: AttributedStringBuilder(cacheKey: "roomList",
permalinkBaseURL: appSettings.permalinkBaseURL,
mentionBuilder: PlainMentionBuilder()))
let eventStringBuilder = RoomEventStringBuilder(stateEventStringBuilder: RoomStateEventStringBuilder(userID: userID),
messageEventStringBuilder: roomMessageEventStringBuilder)
@@ -37,8 +37,7 @@ extension RoomMemberProxyProtocol {
}
var permalink: URL? {
try? PermalinkBuilder.permalinkTo(userIdentifier: userID,
baseURL: ServiceLocator.shared.settings.permalinkBaseURL)
try? URL(string: matrixToUserPermalink(userId: userID))
}
/// The name used for sorting the member alphabetically. This will be the displayname if,
@@ -97,8 +97,7 @@ enum RoomTimelineItemFixtures {
isThreaded: false,
sender: .init(id: "", displayName: "Helena"),
content: .init(body: "",
formattedBody: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
mentionBuilder: MentionBuilder())
formattedBody: AttributedStringBuilder(mentionBuilder: MentionBuilder())
.fromHTML("Hol' up <blockquote>New home office set up!</blockquote>That's amazing! Congrats 🥳")))
]