Bot apps implementation

This commit is contained in:
Ilya Laktyushin
2023-02-28 23:25:35 +04:00
parent 4c6dd1e16d
commit 53d1cb856a
45 changed files with 1553 additions and 394 deletions

View File

@@ -208,12 +208,25 @@ public struct ChatControllerInitialAttachBotStart {
}
}
public struct ChatControllerInitialBotAppStart {
public let botApp: BotApp
public let payload: String?
public let justInstalled: Bool
public init(botApp: BotApp, payload: String?, justInstalled: Bool) {
self.botApp = botApp
self.payload = payload
self.justInstalled = justInstalled
}
}
public enum ChatControllerInteractionNavigateToPeer {
case `default`
case chat(textInputState: ChatTextInputState?, subject: ChatControllerSubject?, peekData: ChatPeekTimeout?)
case info
case withBotStartPayload(ChatControllerInitialBotStart)
case withAttachBot(ChatControllerInitialAttachBotStart)
case withBotApp(ChatControllerInitialBotAppStart)
}
public struct ChatInterfaceForwardOptionsState: Codable, Equatable {