diff --git a/bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs b/bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs index 9688eac4..6469317e 100644 --- a/bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs +++ b/bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs @@ -80,8 +80,10 @@ function {{JS_PREFIX}}_update_user (author, do_block) { function {{JS_PREFIX}}_block_user (author) { const index = {{JS_PREFIX}}_blocked_users.indexOf(author); - if (index !== -1) {{JS_PREFIX}}_blocked_users.push(author); - {{JS_PREFIX}}_update_user(author, true); + if (index === -1) { + {{JS_PREFIX}}_blocked_users.push(author); + {{JS_PREFIX}}_update_user(author, true); + } } function {{JS_PREFIX}}_unblock_user (author) {