Skip to content

Commit 8f8dca5

Browse files
committed
Allow attach menu apps in paid message chats
1 parent 21adc7d commit 8f8dca5

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

submodules/TelegramUI/Sources/ChatControllerOpenAttachmentMenu.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,26 +188,26 @@ extension ChatControllerImpl {
188188
break
189189
}
190190

191-
if !isPaidMessages {
192-
for bot in attachMenuBots.reversed() {
193-
var peerType = peerType
194-
if bot.peer.id == peer.id {
195-
peerType.insert(.sameBot)
196-
peerType.remove(.bot)
197-
}
198-
let button: AttachmentButtonType = .app(bot)
199-
if !bot.peerTypes.intersection(peerType).isEmpty {
200-
buttons.insert(button, at: 1)
201-
202-
if case let .bot(botId, _, _) = subject {
203-
if initialButton == nil && bot.peer.id == botId {
204-
initialButton = button
205-
}
191+
for bot in attachMenuBots.reversed() {
192+
var peerType = peerType
193+
if bot.peer.id == peer.id {
194+
peerType.insert(.sameBot)
195+
peerType.remove(.bot)
196+
}
197+
let button: AttachmentButtonType = .app(bot)
198+
if !bot.peerTypes.intersection(peerType).isEmpty {
199+
buttons.insert(button, at: 1)
200+
201+
if case let .bot(botId, _, _) = subject {
202+
if initialButton == nil && bot.peer.id == botId {
203+
initialButton = button
206204
}
207205
}
208-
allButtons.insert(button, at: 1)
209206
}
207+
allButtons.insert(button, at: 1)
208+
}
210209

210+
if !isPaidMessages {
211211
if context.isPremium, shortcutMessageList.items.count > 0, let user = peer as? TelegramUser, user.botInfo == nil {
212212
if let index = buttons.firstIndex(where: { $0 == .location }) {
213213
buttons.insert(.quickReply, at: index + 1)

0 commit comments

Comments
 (0)