Merge commit 'd92249deba7c728dcb01f3b8f905f6d607c03b7b'

This commit is contained in:
Isaac 2024-09-18 13:58:16 +08:00
commit ba352f9b6e
13 changed files with 117 additions and 13 deletions

View File

@ -89,9 +89,8 @@ extension ReplyMarkupButton {
)) ))
} }
self.init(title: text, titleWhenForwarded: nil, action: .requestPeer(peerType: mappedPeerType, buttonId: buttonId, maxQuantity: maxQuantity)) self.init(title: text, titleWhenForwarded: nil, action: .requestPeer(peerType: mappedPeerType, buttonId: buttonId, maxQuantity: maxQuantity))
case let .keyboardButtonCopy(text, _): case let .keyboardButtonCopy(text, payload):
//TODO:release self.init(title: text, titleWhenForwarded: nil, action: .copyText(payload: payload))
self.init(title: text, titleWhenForwarded: nil, action: .text)
} }
} }
} }

View File

@ -232,6 +232,7 @@ public enum ReplyMarkupButtonAction: PostboxCoding, Equatable {
case openUserProfile(peerId: PeerId) case openUserProfile(peerId: PeerId)
case openWebView(url: String, simple: Bool) case openWebView(url: String, simple: Bool)
case requestPeer(peerType: ReplyMarkupButtonRequestPeerType, buttonId: Int32, maxQuantity: Int32) case requestPeer(peerType: ReplyMarkupButtonRequestPeerType, buttonId: Int32, maxQuantity: Int32)
case copyText(payload: String)
public init(decoder: PostboxDecoder) { public init(decoder: PostboxDecoder) {
switch decoder.decodeInt32ForKey("v", orElse: 0) { switch decoder.decodeInt32ForKey("v", orElse: 0) {
@ -261,6 +262,8 @@ public enum ReplyMarkupButtonAction: PostboxCoding, Equatable {
self = .openWebView(url: decoder.decodeStringForKey("u", orElse: ""), simple: decoder.decodeInt32ForKey("s", orElse: 0) != 0) self = .openWebView(url: decoder.decodeStringForKey("u", orElse: ""), simple: decoder.decodeInt32ForKey("s", orElse: 0) != 0)
case 12: case 12:
self = .requestPeer(peerType: decoder.decode(ReplyMarkupButtonRequestPeerType.self, forKey: "pt") ?? ReplyMarkupButtonRequestPeerType.user(ReplyMarkupButtonRequestPeerType.User(isBot: nil, isPremium: nil)), buttonId: decoder.decodeInt32ForKey("b", orElse: 0), maxQuantity: decoder.decodeInt32ForKey("q", orElse: 1)) self = .requestPeer(peerType: decoder.decode(ReplyMarkupButtonRequestPeerType.self, forKey: "pt") ?? ReplyMarkupButtonRequestPeerType.user(ReplyMarkupButtonRequestPeerType.User(isBot: nil, isPremium: nil)), buttonId: decoder.decodeInt32ForKey("b", orElse: 0), maxQuantity: decoder.decodeInt32ForKey("q", orElse: 1))
case 13:
self = .copyText(payload: decoder.decodeStringForKey("p", orElse: ""))
default: default:
self = .text self = .text
} }
@ -313,6 +316,9 @@ public enum ReplyMarkupButtonAction: PostboxCoding, Equatable {
encoder.encodeInt32(buttonId, forKey: "b") encoder.encodeInt32(buttonId, forKey: "b")
encoder.encode(peerType, forKey: "pt") encoder.encode(peerType, forKey: "pt")
encoder.encodeInt32(maxQuantity, forKey: "q") encoder.encodeInt32(maxQuantity, forKey: "q")
case let .copyText(payload):
encoder.encodeInt32(13, forKey: "v")
encoder.encodeString(payload, forKey: "p")
} }
} }
} }

View File

@ -531,8 +531,8 @@ private class AdMessagesHistoryContextImpl {
self.maskAsSeenDisposables.set(signal.start(), forKey: opaqueId) self.maskAsSeenDisposables.set(signal.start(), forKey: opaqueId)
} }
func markAction(opaqueId: Data) { func markAction(opaqueId: Data, media: Bool, fullscreen: Bool) {
_internal_markAdAction(account: self.account, peerId: self.peerId, opaqueId: opaqueId) _internal_markAdAction(account: self.account, peerId: self.peerId, opaqueId: opaqueId, media: media, fullscreen: fullscreen)
} }
func remove(opaqueId: Data) { func remove(opaqueId: Data) {
@ -593,9 +593,9 @@ public class AdMessagesHistoryContext {
} }
} }
public func markAction(opaqueId: Data) { public func markAction(opaqueId: Data, media: Bool, fullscreen: Bool) {
self.impl.with { impl in self.impl.with { impl in
impl.markAction(opaqueId: opaqueId) impl.markAction(opaqueId: opaqueId, media: media, fullscreen: fullscreen)
} }
} }
@ -607,7 +607,7 @@ public class AdMessagesHistoryContext {
} }
func _internal_markAdAction(account: Account, peerId: EnginePeer.Id, opaqueId: Data) { func _internal_markAdAction(account: Account, peerId: EnginePeer.Id, opaqueId: Data, media: Bool, fullscreen: Bool) {
let signal: Signal<Never, NoError> = account.postbox.transaction { transaction -> Api.InputChannel? in let signal: Signal<Never, NoError> = account.postbox.transaction { transaction -> Api.InputChannel? in
return transaction.getPeer(peerId).flatMap(apiInputChannel) return transaction.getPeer(peerId).flatMap(apiInputChannel)
} }
@ -615,7 +615,14 @@ func _internal_markAdAction(account: Account, peerId: EnginePeer.Id, opaqueId: D
guard let inputChannel = inputChannel else { guard let inputChannel = inputChannel else {
return .complete() return .complete()
} }
return account.network.request(Api.functions.channels.clickSponsoredMessage(flags: 0, channel: inputChannel, randomId: Buffer(data: opaqueId))) var flags: Int32 = 0
if media {
flags |= (1 << 0)
}
if fullscreen {
flags |= (1 << 1)
}
return account.network.request(Api.functions.channels.clickSponsoredMessage(flags: flags, channel: inputChannel, randomId: Buffer(data: opaqueId)))
|> `catch` { _ -> Signal<Api.Bool, NoError> in |> `catch` { _ -> Signal<Api.Bool, NoError> in
return .single(.boolFalse) return .single(.boolFalse)
} }

View File

@ -1466,8 +1466,9 @@ public extension TelegramEngine {
public func updateExtendedMedia(messageIds: [EngineMessage.Id]) -> Signal<Never, NoError> { public func updateExtendedMedia(messageIds: [EngineMessage.Id]) -> Signal<Never, NoError> {
return _internal_updateExtendedMedia(account: self.account, messageIds: messageIds) return _internal_updateExtendedMedia(account: self.account, messageIds: messageIds)
} }
public func markAdAction(peerId: EnginePeer.Id, opaqueId: Data) {
_internal_markAdAction(account: self.account, peerId: peerId, opaqueId: opaqueId) public func markAdAction(peerId: EnginePeer.Id, opaqueId: Data, media: Bool, fullscreen: Bool) {
_internal_markAdAction(account: self.account, peerId: peerId, opaqueId: opaqueId, media: media, fullscreen: fullscreen)
} }
public func getAllLocalChannels(count: Int) -> Signal<[EnginePeer.Id], NoError> { public func getAllLocalChannels(count: Int) -> Signal<[EnginePeer.Id], NoError> {

View File

@ -543,6 +543,7 @@ public final class PrincipalThemeAdditionalGraphics {
public let chatBubbleActionButtonIncomingProfileIconImage: UIImage public let chatBubbleActionButtonIncomingProfileIconImage: UIImage
public let chatBubbleActionButtonIncomingAddToChatIconImage: UIImage public let chatBubbleActionButtonIncomingAddToChatIconImage: UIImage
public let chatBubbleActionButtonIncomingWebAppIconImage: UIImage public let chatBubbleActionButtonIncomingWebAppIconImage: UIImage
public let chatBubbleActionButtonIncomingCopyIconImage: UIImage
public let chatBubbleActionButtonOutgoingMessageIconImage: UIImage public let chatBubbleActionButtonOutgoingMessageIconImage: UIImage
public let chatBubbleActionButtonOutgoingLinkIconImage: UIImage public let chatBubbleActionButtonOutgoingLinkIconImage: UIImage
@ -553,6 +554,7 @@ public final class PrincipalThemeAdditionalGraphics {
public let chatBubbleActionButtonOutgoingProfileIconImage: UIImage public let chatBubbleActionButtonOutgoingProfileIconImage: UIImage
public let chatBubbleActionButtonOutgoingAddToChatIconImage: UIImage public let chatBubbleActionButtonOutgoingAddToChatIconImage: UIImage
public let chatBubbleActionButtonOutgoingWebAppIconImage: UIImage public let chatBubbleActionButtonOutgoingWebAppIconImage: UIImage
public let chatBubbleActionButtonOutgoingCopyIconImage: UIImage
public let chatEmptyItemLockIcon: UIImage public let chatEmptyItemLockIcon: UIImage
public let emptyChatListCheckIcon: UIImage public let emptyChatListCheckIcon: UIImage
@ -598,6 +600,8 @@ public final class PrincipalThemeAdditionalGraphics {
self.chatBubbleActionButtonIncomingProfileIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotProfile"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonIncomingProfileIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotProfile"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonIncomingAddToChatIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotAddToChat"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonIncomingAddToChatIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotAddToChat"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonIncomingWebAppIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotWebApp"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonIncomingWebAppIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotWebApp"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonIncomingCopyIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotCopy"), color: bubbleVariableColor(variableColor: theme.message.incoming.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingMessageIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotMessage"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingMessageIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotMessage"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingLinkIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotLink"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingLinkIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotLink"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingShareIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotShare"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingShareIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotShare"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
@ -607,6 +611,7 @@ public final class PrincipalThemeAdditionalGraphics {
self.chatBubbleActionButtonOutgoingProfileIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotProfile"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingProfileIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotProfile"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingAddToChatIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotAddToChat"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingAddToChatIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotAddToChat"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingWebAppIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotWebApp"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))! self.chatBubbleActionButtonOutgoingWebAppIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotWebApp"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatBubbleActionButtonOutgoingCopyIconImage = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/BotCopy"), color: bubbleVariableColor(variableColor: theme.message.outgoing.actionButtonsTextColor, wallpaper: wallpaper))!
self.chatEmptyItemLockIcon = generateImage(CGSize(width: 9.0, height: 13.0), rotatedContext: { size, context in self.chatEmptyItemLockIcon = generateImage(CGSize(width: 9.0, height: 13.0), rotatedContext: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size)) context.clear(CGRect(origin: CGPoint(), size: size))

View File

@ -438,6 +438,8 @@ public final class ChatButtonKeyboardInputNode: ChatInputNode {
if let message = self.message { if let message = self.message {
self.controllerInteraction.openRequestedPeerSelection(message.id, peerType, buttonId, maxQuantity) self.controllerInteraction.openRequestedPeerSelection(message.id, peerType, buttonId, maxQuantity)
} }
case let .copyText(payload):
self.controllerInteraction.copyText(payload)
} }
if dismissIfOnce { if dismissIfOnce {
if let message = self.message { if let message = self.message {

View File

@ -215,6 +215,8 @@ private final class ChatMessageActionButtonNode: ASDisplayNode {
iconImage = incoming ? graphics.chatBubbleActionButtonIncomingProfileIconImage : graphics.chatBubbleActionButtonOutgoingProfileIconImage iconImage = incoming ? graphics.chatBubbleActionButtonIncomingProfileIconImage : graphics.chatBubbleActionButtonOutgoingProfileIconImage
case .openWebView: case .openWebView:
iconImage = incoming ? graphics.chatBubbleActionButtonIncomingWebAppIconImage : graphics.chatBubbleActionButtonOutgoingWebAppIconImage iconImage = incoming ? graphics.chatBubbleActionButtonIncomingWebAppIconImage : graphics.chatBubbleActionButtonOutgoingWebAppIconImage
case .copyText:
iconImage = incoming ? graphics.chatBubbleActionButtonIncomingCopyIconImage : graphics.chatBubbleActionButtonOutgoingCopyIconImage
default: default:
iconImage = nil iconImage = nil
} }

View File

@ -205,6 +205,7 @@ private func contentNodeMessagesAndClassesForItem(_ item: ChatMessageItem) -> ([
result.append((message, ChatMessageGiftBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default))) result.append((message, ChatMessageGiftBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default)))
} else if case .giftStars = action.action { } else if case .giftStars = action.action {
result.append((message, ChatMessageGiftBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default))) result.append((message, ChatMessageGiftBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default)))
skipText = true
} else if case .suggestedProfilePhoto = action.action { } else if case .suggestedProfilePhoto = action.action {
result.append((message, ChatMessageProfilePhotoSuggestionContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default))) result.append((message, ChatMessageProfilePhotoSuggestionContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: .default)))
} else if case .setChatWallpaper = action.action { } else if case .setChatWallpaper = action.action {

View File

@ -863,6 +863,8 @@ open class ChatMessageItemView: ListViewItemNode, ChatMessageItemNodeProtocol {
item.controllerInteraction.openWebView(button.title, url, simple, .generic) item.controllerInteraction.openWebView(button.title, url, simple, .generic)
case .requestPeer: case .requestPeer:
break break
case let .copyText(payload):
item.controllerInteraction.copyText(payload)
} }
} }
} }

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "copy_10.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,65 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Filter /FlateDecode
/Length 3 0 R
>>
stream
x<01>ÍŽ$5„ïõ{F¢Öÿi_‰3ð­]<5D>Z‰çç ÛåòL<C3B2>uiw”3<E2809D>?áúüË—þz|ùýן>ýüÇñùþ÷ø~ü}øÓõç“»?®Õz·ëÕãõ¶|^||;™XògÙ¼é,,X.ìåÈgb£µËg-Îûz#åôÕµZ@|‰©qþQÎTb²ÎbßUZ0î̱˜y<CB9C>KöBªoÎ'ììrêO[­áÓ†äÜZð7²ØìâY,eoľ°¤¸J«·e²†Z‰¡¥dIH‰5Å@\-[*`5eWõ©ÅJò.Z Ä\¾dS åÌÕçf`É×ä"»8¦¤ <E28099>Yv®K¤E ¹b—Ʋ)<½ôÄ>±ra¹cÝIënà<È®£ÓŽ]Êÿ Ú®4â•ÈH•²<E280A2>ôí*Èãˆ:FEªWÙâUÈ…„«Ü yÜÜZØ tœÍ[ØjðB ˆjãq,²ØMŸI(ªpQŒ¨D;»ˆ(;<òPðgº>Sz³[I¼ÜØJbCf+†•„|ÍHWÛb½šÛ—ƒµZN9ƒ‡cÞ¼Â[Èãøóøz|;~û¿²¯E¸ÿ-L Kþ,w¯w»¶µ{aÏI}”úGZõjn_d‡GžŽye¼Ù-
líÎ'Ôv¾lÅCü̲ÏÃYeT™ãÖ|ÒXɤ`­GrjD³!ýìx#²Ó y¦¤¹é_˜Ç²†öé3[„0³Q¾ü˜ì¦ÉfÄ鮦_QiúY„¡ŠA<1A>Xô™•È—”¤»ºÚt5Cmº'iRQ6Ò¤è±C[X"O±¿¤Ò)°ŒÝ/Q®ê)0ÇÄAtt<74>
ñ“/ˆôÀLB¦Ê $G+-$ ]$ÕA”|ŽØŽazø?ÊX<C38A>°…P4Âu¶ÛÁ1
JEuß<EFBFBD> L­³tYŠQ½½=Z^&£D"3»tÎλçáÑÌÒ¼ÖÐ6¡Í{jóÊMÂ[G8ÓZ© ÑpH"q™+µß$z´'–Ø‚*1±-Ë—‰qkøÓ²Qá KqÔ'û:bp‰¶Z&"4oÞ<07>jÌ™¢…B)è<>·Jîì2Šâ~
µ€@ÙN<-6×o¸|ÂåR%p)éžÊ§÷ ¡U îekNPCU5nìÁJJº?_¸
wC ˜á`NÇx]tÏÊ€(„É þÇÔP˜ÃOŽ/F<>T¨ké!š
 °Ñ®sáUŸ^RC®ý"N)Ñ3³Ü/œL˜<ÊD½ø¤ðæš<18>öPLŽá§¼8Ð\'î#‰…ëm<C3AB>Úqľ)¾ôˆ™K9Þ`j=<™˜òžØÚ70Æ”7H£þƒXŒÊ8µÓ[ô£G}Oá~TÞ;cÉ®vi »<C2A0>)0ˆ CŽAîÛwŠövGOõÞîñ©ÞÛmOu†z¯o*8Ô{!ô‚ QT¯ý+D½&.ÈpcPy@ 6D"òþ«GRƒÜ—ÄG„”õ1>ú~´ˆÂùæ+ i{÷-&ù£éTA(OI†Kõì²)»Ž<C2BB>ƒ©_L£RÚþRªÊgœˆãÝ­š>B¡ÇÑÐs„óæ«t<06><><EFBFBD>4@®Äfª´|¤Ïœ<C38F>l_Ô$6ʶ!³´ ¡<>dC6»Õ¨íK|µsCfˉjÐ`C±/²¦èC.BMŠ1ʃvˆ²ëäì4‡®Uv8!t P´Ð|×]©ñ×ú'Ô¿“ŸT
endstream
endobj
3 0 obj
1308
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 10.000000 10.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000001426 00000 n
0000001449 00000 n
0000001622 00000 n
0000001696 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1755
%%EOF

View File

@ -2589,7 +2589,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} }
if let message, let adAttribute = message.attributes.first(where: { $0 is AdMessageAttribute }) as? AdMessageAttribute { if let message, let adAttribute = message.attributes.first(where: { $0 is AdMessageAttribute }) as? AdMessageAttribute {
strongSelf.chatDisplayNode.historyNode.adMessagesContext?.markAction(opaqueId: adAttribute.opaqueId) strongSelf.chatDisplayNode.historyNode.adMessagesContext?.markAction(opaqueId: adAttribute.opaqueId, media: false, fullscreen: false)
} }
if let performOpenURL = strongSelf.performOpenURL { if let performOpenURL = strongSelf.performOpenURL {
@ -3917,7 +3917,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
} }
} }
self.chatDisplayNode.historyNode.adMessagesContext?.markAction(opaqueId: adAttribute.opaqueId) self.chatDisplayNode.historyNode.adMessagesContext?.markAction(opaqueId: adAttribute.opaqueId, media: false, fullscreen: false)
self.controllerInteraction?.openUrl(ChatControllerInteraction.OpenUrl(url: adAttribute.url, concealed: false, external: true, progress: progress)) self.controllerInteraction?.openUrl(ChatControllerInteraction.OpenUrl(url: adAttribute.url, concealed: false, external: true, progress: progress))
}, openRequestedPeerSelection: { [weak self] messageId, peerType, buttonId, maxQuantity in }, openRequestedPeerSelection: { [weak self] messageId, peerType, buttonId, maxQuantity in
guard let self else { guard let self else {

View File

@ -971,6 +971,8 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode {
controllerInteraction.openWebView(button.title, url, simple, .generic) controllerInteraction.openWebView(button.title, url, simple, .generic)
case .requestPeer: case .requestPeer:
break break
case let .copyText(payload):
controllerInteraction.copyText(payload)
} }
break break