Bot peer request support

Launch screen icon
This commit is contained in:
Ilya Laktyushin
2023-01-13 22:38:04 +04:00
parent 58e641230a
commit 930e237bf1
37 changed files with 1242 additions and 125 deletions

View File

@@ -834,9 +834,8 @@ public func universalServiceMessageString(presentationData: (PresentationTheme,
case .attachMenuBotAllowed:
attributedString = NSAttributedString(string: strings.Notification_BotWriteAllowed, font: titleFont, textColor: primaryTextColor)
case let .requestedPeer(_, peerId):
//TODO:localize
let _ = peerId
attributedString = NSAttributedString(string: "Requested Chat", font: titleFont, textColor: primaryTextColor)
let peerName = message.peers[peerId].flatMap(EnginePeer.init)?.displayTitle(strings: strings, displayOrder: nameDisplayOrder) ?? ""
attributedString = addAttributesToStringWithRanges(strings.Notification_RequestedPeer(peerName)._tuple, body: bodyAttributes, argumentAttributes: peerMentionsAttributes(primaryTextColor: primaryTextColor, peerIds: [(0, peerId)]))
case .unknown:
attributedString = nil
}