Reaction improvements

This commit is contained in:
Ali
2022-08-19 22:51:12 +03:00
parent 8f2a7327d7
commit ffe00ac2e1
54 changed files with 1847 additions and 462 deletions

View File

@@ -322,6 +322,17 @@ public extension Message {
}
return nil
}
var effectiveReactions: [MessageReaction]? {
if !self.hasReactions {
return nil
}
if let result = mergedMessageReactions(attributes: self.attributes) {
return result.reactions
} else {
return nil
}
}
var hasReactions: Bool {
for attribute in self.attributes {
if let attribute = attribute as? ReactionsMessageAttribute {