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)