Skip to content

Commit

Permalink
await call to isBlockingAvailable()
Browse files Browse the repository at this point in the history
  • Loading branch information
udanieli committed May 30, 2023
1 parent 7455a14 commit dacc9ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/headless/plugins/blocking/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dacc9ea

Please sign in to comment.