feat: link preview scammer
This commit is contained in:
parent
3030a689d8
commit
59d7dcc737
|
@ -152,3 +152,14 @@ proc setCommunityInfo*(self: LinkPreview, community: CommunityDto): bool =
|
||||||
if self.previewType == PreviewType.StatusCommunityChannelPreview:
|
if self.previewType == PreviewType.StatusCommunityChannelPreview:
|
||||||
return self.statusCommunityChannelPreview.setCommunityInfo(community)
|
return self.statusCommunityChannelPreview.setCommunityInfo(community)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
proc malform*(self: LinkPreview) =
|
||||||
|
case self.previewType:
|
||||||
|
of PreviewType.StatusContactPreview:
|
||||||
|
self.statusContactPreview.malform()
|
||||||
|
of PreviewType.StatusCommunityPreview:
|
||||||
|
self.statusCommunityPreview.malform()
|
||||||
|
of PreviewType.StatusCommunityChannelPreview:
|
||||||
|
self.statusCommunityChannelPreview.malform()
|
||||||
|
else:
|
||||||
|
discard
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -123,3 +123,9 @@ QtObject:
|
||||||
self.colorChanged()
|
self.colorChanged()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
proc malform*(self: StatusCommunityChannelLinkPreview) =
|
||||||
|
self.community.malform()
|
||||||
|
self.displayName = "SCAM"
|
||||||
|
self.description = "SCAM"
|
||||||
|
self.color = "#0000FF"
|
||||||
|
|
|
@ -156,3 +156,11 @@ QtObject:
|
||||||
self.banner.update(0, 0, "", community.images.banner)
|
self.banner.update(0, 0, "", community.images.banner)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
proc malform*(self: StatusCommunityLinkPreview) =
|
||||||
|
self.displayName = "SCAM"
|
||||||
|
self.description = "SCAM"
|
||||||
|
self.membersCount = 999
|
||||||
|
self.color = "#FF0000"
|
||||||
|
self.icon.malform(false)
|
||||||
|
self.banner.malform(true)
|
||||||
|
|
|
@ -104,3 +104,8 @@ QtObject:
|
||||||
self.icon.update(0, 0, contactDetails.dto.image.thumbnail, "")
|
self.icon.update(0, 0, contactDetails.dto.image.thumbnail, "")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
proc malform*(self: StatusContactLinkPreview) =
|
||||||
|
self.displayName = "SCAM"
|
||||||
|
self.description = "SCAM"
|
||||||
|
self.icon.malform(false)
|
||||||
|
|
|
@ -852,6 +852,7 @@ QtObject:
|
||||||
if unfurlResponse.getProp("statusLinkPreviews", statusLinkPreviewsArr):
|
if unfurlResponse.getProp("statusLinkPreviews", statusLinkPreviewsArr):
|
||||||
for element in statusLinkPreviewsArr.getElems():
|
for element in statusLinkPreviewsArr.getElems():
|
||||||
let linkPreview = element.toLinkPreview(false)
|
let linkPreview = element.toLinkPreview(false)
|
||||||
|
linkPreview.malform()
|
||||||
linkPreviews[linkPreview.url] = linkPreview
|
linkPreviews[linkPreview.url] = linkPreview
|
||||||
|
|
||||||
for url in requestedUrls:
|
for url in requestedUrls:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1d08b403e6818b6efd31785fbc73ece3d44e4926
|
Subproject commit 791e04846322f9638a5c28e8ce75fdca471899a3
|
Loading…
Reference in New Issue