Use WebURL for status URLs

This commit is contained in:
Shadowfacts 2023-01-02 11:36:06 -05:00
parent 3ea1ad5622
commit b45d3fb80a
2 changed files with 4 additions and 2 deletions

View File

@ -7,11 +7,12 @@
//
import Foundation
import WebURL
public final class Status: StatusProtocol, Decodable {
public let id: String
public let uri: String
public let url: URL?
public let url: WebURL?
public let account: Account
public let inReplyToID: String?
public let inReplyToAccountID: String?

View File

@ -10,6 +10,7 @@
import Foundation
import CoreData
import Pachyderm
import WebURLFoundationExtras
@objc(StatusMO)
public final class StatusMO: NSManagedObject, StatusProtocol {
@ -127,7 +128,7 @@ extension StatusMO {
self.sensitive = status.sensitive
self.spoilerText = status.spoilerText
self.uri = status.uri
self.url = status.url
self.url = status.url != nil ? URL(status.url!) : nil
self.visibility = status.visibility
self.poll = status.poll
self.localOnly = status.localOnly ?? false