mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[WIP] Topics
This commit is contained in:
@@ -242,12 +242,14 @@ final class ChatButtonKeyboardInputNode: ChatInputNode {
|
||||
botPeer = message.author
|
||||
}
|
||||
|
||||
var peerId: PeerId?
|
||||
var peer: Peer?
|
||||
if samePeer {
|
||||
peerId = message.id.peerId
|
||||
peer = message.peers[message.id.peerId]
|
||||
} else {
|
||||
peer = botPeer
|
||||
}
|
||||
if let botPeer = botPeer, let addressName = botPeer.addressName {
|
||||
self.controllerInteraction.openPeer(peerId, .chat(textInputState: ChatTextInputState(inputText: NSAttributedString(string: "@\(addressName) \(query)")), subject: nil, peekData: nil), nil, false, nil)
|
||||
if let peer = peer, let botPeer = botPeer, let addressName = botPeer.addressName {
|
||||
self.controllerInteraction.openPeer(EnginePeer(peer), .chat(textInputState: ChatTextInputState(inputText: NSAttributedString(string: "@\(addressName) \(query)")), subject: nil, peekData: nil), nil, false)
|
||||
}
|
||||
}
|
||||
case .payment:
|
||||
@@ -259,7 +261,13 @@ final class ChatButtonKeyboardInputNode: ChatInputNode {
|
||||
case let .setupPoll(isQuiz):
|
||||
self.controllerInteraction.openPollCreation(isQuiz)
|
||||
case let .openUserProfile(peerId):
|
||||
self.controllerInteraction.openPeer(peerId, .info, nil, false, nil)
|
||||
let _ = (self.context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: peerId))
|
||||
|> deliverOnMainQueue).start(next: { [weak self] peer in
|
||||
guard let self, let peer else {
|
||||
return
|
||||
}
|
||||
self.controllerInteraction.openPeer(peer, .info, nil, false)
|
||||
})
|
||||
case let .openWebView(url, simple):
|
||||
self.controllerInteraction.openWebView(markupButton.title, url, simple, false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user