Add some missing code from previous commit
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -13,6 +13,21 @@ struct Profile: Decodable {
|
||||
let display_name: String?
|
||||
let about: String?
|
||||
let picture: String?
|
||||
let website: String?
|
||||
let lud06: String?
|
||||
let lud16: String?
|
||||
|
||||
var lightning_uri: URL? {
|
||||
if let url = (self.lud06.flatMap { URL(string: "lightning:" + $0) }) {
|
||||
return url
|
||||
}
|
||||
|
||||
if let url = (self.lud16.flatMap { URL(string: "lightning:" + $0) }) {
|
||||
return url
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
static func displayName(profile: Profile?, pubkey: String) -> String {
|
||||
return profile?.name ?? abbrev_pubkey(pubkey)
|
||||
|
||||
Reference in New Issue
Block a user