diff --git a/submodules/TelegramCore/Sources/SearchStickers.swift b/submodules/TelegramCore/Sources/SearchStickers.swift index a0cfcf01d5..c587c38215 100644 --- a/submodules/TelegramCore/Sources/SearchStickers.swift +++ b/submodules/TelegramCore/Sources/SearchStickers.swift @@ -300,8 +300,12 @@ public func searchStickerSets(postbox: Postbox, query: String) -> Signal Signal { - 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 in return account.postbox.loadedPeerWithId(peerId)