mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
[WIP] Quotes and link previews
This commit is contained in:
parent
137c3d9101
commit
af8474aca5
88 changed files with 2582 additions and 966 deletions
|
|
@ -437,6 +437,17 @@ public extension Message {
|
|||
}
|
||||
}
|
||||
|
||||
public extension Message {
|
||||
var webpagePreviewAttribute: WebpagePreviewMessageAttribute? {
|
||||
for attribute in self.attributes {
|
||||
if let attribute = attribute as? WebpagePreviewMessageAttribute {
|
||||
return attribute
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
public func _internal_parseMediaAttachment(data: Data) -> Media? {
|
||||
guard let object = Api.parse(Buffer(buffer: MemoryBuffer(data: data))) else {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue