mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-08 19:10:53 +00:00
Don't send interactive dice in secret chats
This commit is contained in:
parent
eb4105cc36
commit
055dfe503c
@ -2241,7 +2241,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
var messages: [EnqueueMessage] = []
|
||||
|
||||
let effectiveInputText = effectivePresentationInterfaceState.interfaceState.composeInputState.inputText
|
||||
if effectiveInputText.string.trimmingCharacters(in: .whitespacesAndNewlines) == "🎲" {
|
||||
if case let .peer(peerId) = effectivePresentationInterfaceState.chatLocation, peerId.namespace != Namespaces.Peer.SecretChat, effectiveInputText.string.trimmingCharacters(in: .whitespacesAndNewlines) == "🎲" {
|
||||
messages.append(.message(text: "", attributes: [], mediaReference: AnyMediaReference.standalone(media: TelegramMediaDice()), replyToMessageId: self.chatPresentationInterfaceState.interfaceState.replyMessageId, localGroupingKey: nil))
|
||||
} else {
|
||||
let inputText = convertMarkdownToAttributes(effectiveInputText)
|
||||
|
Loading…
x
Reference in New Issue
Block a user