no message

This commit is contained in:
Peter
2017-09-11 00:07:59 +03:00
parent baf29247eb
commit 266d87d1e7
92 changed files with 1947 additions and 991 deletions

View File

@@ -174,15 +174,15 @@ final class ChatBotInfoItemNode: ListViewItemNode {
func tapActionAtPoint(_ point: CGPoint) -> ChatMessageBubbleContentTapAction {
let textNodeFrame = self.textNode.frame
if let (_, attributes) = self.textNode.attributesAtPoint(CGPoint(x: point.x - textNodeFrame.minX, y: point.y - textNodeFrame.minY)) {
if let url = attributes[TextNode.UrlAttribute] as? String {
if let url = attributes[NSAttributedStringKey(rawValue: TextNode.UrlAttribute)] as? String {
return .url(url)
} else if let peerMention = attributes[TextNode.TelegramPeerMentionAttribute] as? TelegramPeerMention {
} else if let peerMention = attributes[NSAttributedStringKey(rawValue: TextNode.TelegramPeerMentionAttribute)] as? TelegramPeerMention {
return .peerMention(peerMention.peerId, peerMention.mention)
} else if let peerName = attributes[TextNode.TelegramPeerTextMentionAttribute] as? String {
} else if let peerName = attributes[NSAttributedStringKey(rawValue: TextNode.TelegramPeerTextMentionAttribute)] as? String {
return .textMention(peerName)
} else if let botCommand = attributes[TextNode.TelegramBotCommandAttribute] as? String {
} else if let botCommand = attributes[NSAttributedStringKey(rawValue: TextNode.TelegramBotCommandAttribute)] as? String {
return .botCommand(botCommand)
} else if let hashtag = attributes[TextNode.TelegramHashtagAttribute] as? TelegramHashtag {
} else if let hashtag = attributes[NSAttributedStringKey(rawValue: TextNode.TelegramHashtagAttribute)] as? TelegramHashtag {
return .hashtag(hashtag.peerName, hashtag.hashtag)
} else {
return .none