Update API

This commit is contained in:
Ali
2023-09-04 00:17:51 +04:00
parent b7829bbeba
commit 739adeff1f
6 changed files with 56 additions and 18 deletions

View File

@@ -302,7 +302,7 @@ func managedSynchronizeAttachMenuBots(accountPeerId: PeerId, postbox: Postbox, n
}
if !icons.isEmpty {
var peerTypes: AttachMenuBots.Bot.PeerFlags = []
for apiType in apiPeerTypes {
for apiType in apiPeerTypes ?? [] {
switch apiType {
case .attachMenuPeerTypeSameBotPM:
peerTypes.insert(.sameBot)
@@ -505,7 +505,7 @@ func _internal_getAttachMenuBot(accountPeerId: PeerId, postbox: Postbox, network
}
}
var peerTypes: AttachMenuBots.Bot.PeerFlags = []
for apiType in apiPeerTypes {
for apiType in apiPeerTypes ?? [] {
switch apiType {
case .attachMenuPeerTypeSameBotPM:
peerTypes.insert(.sameBot)

View File

@@ -31,7 +31,7 @@ func _internal_requestSimpleWebView(postbox: Postbox, network: Network, botId: P
if inline {
flags |= (1 << 1)
}
return network.request(Api.functions.messages.requestSimpleWebView(flags: flags, bot: inputUser, url: url, themeParams: serializedThemeParams, platform: botWebViewPlatform))
return network.request(Api.functions.messages.requestSimpleWebView(flags: flags, bot: inputUser, url: url, startParam: nil, themeParams: serializedThemeParams, platform: botWebViewPlatform))
|> mapError { _ -> RequestSimpleWebViewError in
return .generic
}