From 055dfe503c9026ca91134823345c96c3dca287b0 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 25 Mar 2020 23:28:48 +0400 Subject: [PATCH] Don't send interactive dice in secret chats --- submodules/TelegramUI/Sources/ChatControllerNode.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/TelegramUI/Sources/ChatControllerNode.swift b/submodules/TelegramUI/Sources/ChatControllerNode.swift index 674b1ef399..aa9a01fdf9 100644 --- a/submodules/TelegramUI/Sources/ChatControllerNode.swift +++ b/submodules/TelegramUI/Sources/ChatControllerNode.swift @@ -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)