From dacc9ea54e1a8c6283545cab0c7af2f31dede2b6 Mon Sep 17 00:00:00 2001 From: danieli Date: Tue, 30 May 2023 16:47:50 +0200 Subject: [PATCH] await call to isBlockingAvailable() --- src/headless/plugins/blocking/api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/headless/plugins/blocking/api.js b/src/headless/plugins/blocking/api.js index 11df3692ae..f51cede58f 100644 --- a/src/headless/plugins/blocking/api.js +++ b/src/headless/plugins/blocking/api.js @@ -22,9 +22,10 @@ export default { * @private * @method api.refreshBlocklist */ - refreshBlocklist () { + async refreshBlocklist () { log.debug("refreshing blocklist"); - if (!this.isBlockingAvailable()) { + const available = await this.isBlockingAvailable(); + if (!available) { log.debug("XEP-0191 NOT available, not refreshing..."); api.trigger('blockListFetched', []); return