parent
bbd1adcabb
commit
76eda30fc1
|
@ -75,10 +75,10 @@ proc `$`*(self: LinkPreview): string =
|
||||||
proc `%`*(self: LinkPreview): JsonNode =
|
proc `%`*(self: LinkPreview): JsonNode =
|
||||||
result = %* {
|
result = %* {
|
||||||
"url": self.url,
|
"url": self.url,
|
||||||
"standardPreview": %self.standardPreview,
|
"standardPreview": if self.standardPreview != nil: %self.standardPreview else: newJNull(),
|
||||||
"contactPreview": %self.statusContactPreview,
|
"contactPreview": if self.statusContactPreview != nil: %self.statusContactPreview else: newJNull(),
|
||||||
"communityPreview": %self.statusCommunityPreview,
|
"communityPreview": if self.statusCommunityPreview != nil: %self.statusCommunityPreview else: newJNull(),
|
||||||
"channelPreview": %self.statusCommunityChannelPreview
|
"channelPreview": if self.statusCommunityChannelPreview != nil: %self.statusCommunityChannelPreview else: newJNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
proc empty*(self: LinkPreview): bool =
|
proc empty*(self: LinkPreview): bool =
|
||||||
|
|
Loading…
Reference in New Issue