From 91f9c60660c2d11d3416f0af7419021604f4bead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 10 Jul 2018 12:14:12 -0400 Subject: [PATCH] closes #6643 --- src/user/blocks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user/blocks.js b/src/user/blocks.js index e2689d8df9..51bb4520f1 100644 --- a/src/user/blocks.js +++ b/src/user/blocks.js @@ -73,8 +73,8 @@ module.exports = function (User) { async.apply(db.sortedSetAdd.bind(db), 'uid:' + uid + ':blocked_uids', Date.now(), targetUid), async.apply(User.incrementUserFieldBy, uid, 'blocksCount', 1), function (_blank, next) { - User.blocks._cache.del(uid); - pubsub.publish('user:blocks:cache:del', uid); + User.blocks._cache.del(parseInt(uid, 10)); + pubsub.publish('user:blocks:cache:del', parseInt(uid, 10)); setImmediate(next); }, ], callback); @@ -86,8 +86,8 @@ module.exports = function (User) { async.apply(db.sortedSetRemove.bind(db), 'uid:' + uid + ':blocked_uids', targetUid), async.apply(User.decrementUserFieldBy, uid, 'blocksCount', 1), function (_blank, next) { - User.blocks._cache.del(uid); - pubsub.publish('user:blocks:cache:del', uid); + User.blocks._cache.del(parseInt(uid, 10)); + pubsub.publish('user:blocks:cache:del', parseInt(uid, 10)); setImmediate(next); }, ], callback);