don't call search on a disabled msg provider

A provider might be available, but not functional (broken migration
invalid configuration or what have you).
Don't try to call search in this case.
This commit is contained in:
Reto Brunner 2022-10-02 11:00:52 +02:00
parent cebc6d069f
commit bea4545abf

View file

@ -619,7 +619,7 @@ class Client {
}
search(query: SearchQuery) {
if (this.messageProvider === undefined) {
if (!this.messageProvider?.isEnabled) {
return Promise.resolve({
results: [],
target: "",