mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 12:17:53 +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> {
|
public func searchGifs(account: Account, query: String) -> Signal<ChatContextResultCollection?, NoError> {
|
||||||
return resolvePeerByName(account: account, name: "gif")
|
return account.postbox.transaction { transaction -> String in
|
||||||
|> filter { $0 != nil }
|
let configuration = currentSearchBotsConfiguration(transaction: transaction)
|
||||||
|
return configuration.gifBotUsername ?? "gif"
|
||||||
|
} |> mapToSignal {
|
||||||
|
return resolvePeerByName(account: account, name: $0)
|
||||||
|
} |> filter { $0 != nil }
|
||||||
|> map { $0! }
|
|> map { $0! }
|
||||||
|> mapToSignal { peerId -> Signal<Peer, NoError> in
|
|> mapToSignal { peerId -> Signal<Peer, NoError> in
|
||||||
return account.postbox.loadedPeerWithId(peerId)
|
return account.postbox.loadedPeerWithId(peerId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user