mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 04:08:07 +00:00
[skip ci]
This commit is contained in:
parent
ff34583575
commit
60dbdc198e
@ -300,8 +300,12 @@ public func searchStickerSets(postbox: Postbox, query: String) -> Signal<FoundSt
|
||||
}
|
||||
|
||||
public func searchGifs(account: Account, query: String) -> Signal<ChatContextResultCollection?, NoError> {
|
||||
return resolvePeerByName(account: account, name: "gif")
|
||||
|> filter { $0 != nil }
|
||||
return account.postbox.transaction { transaction -> String in
|
||||
let configuration = currentSearchBotsConfiguration(transaction: transaction)
|
||||
return configuration.gifBotUsername ?? "gif"
|
||||
} |> mapToSignal {
|
||||
return resolvePeerByName(account: account, name: $0)
|
||||
} |> filter { $0 != nil }
|
||||
|> map { $0! }
|
||||
|> mapToSignal { peerId -> Signal<Peer, NoError> in
|
||||
return account.postbox.loadedPeerWithId(peerId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user