mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
[WIP] Privacy update
This commit is contained in:
@@ -417,6 +417,17 @@ public extension Message {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
var effectiveReactionsAttribute: ReactionsMessageAttribute? {
|
||||
if !self.hasReactions {
|
||||
return nil
|
||||
}
|
||||
|
||||
if let result = mergedMessageReactions(attributes: self.attributes) {
|
||||
return result
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
var effectiveReactions: [MessageReaction]? {
|
||||
if !self.hasReactions {
|
||||
return nil
|
||||
@@ -476,6 +487,19 @@ public extension Message {
|
||||
}
|
||||
}
|
||||
|
||||
public extension Message {
|
||||
func areReactionsTags(accountPeerId: PeerId) -> Bool {
|
||||
if self.id.peerId == accountPeerId {
|
||||
if let reactionsAttribute = self.reactionsAttribute, !reactionsAttribute.reactions.isEmpty {
|
||||
return reactionsAttribute.isTags
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func _internal_parseMediaAttachment(data: Data) -> Media? {
|
||||
guard let object = Api.parse(Buffer(buffer: MemoryBuffer(data: data))) else {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user