[WIP] Quotes and link previews

This commit is contained in:
Ali 2023-10-18 01:11:23 +04:00
parent 137c3d9101
commit af8474aca5
88 changed files with 2582 additions and 966 deletions

View file

@ -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