diff --git a/src/socket.io/posts/tools.js b/src/socket.io/posts/tools.js index 6c78b80c3e..9c3ee0af49 100644 --- a/src/socket.io/posts/tools.js +++ b/src/socket.io/posts/tools.js @@ -167,7 +167,7 @@ module.exports = function (SocketPosts) { if (!data || !Array.isArray(data.pids) || !data.toUid) { throw new Error('[[error:invalid-data]]'); } - const isAdminOrGlobalMod = user.isAdminOrGlobalMod(socket.uid); + const isAdminOrGlobalMod = await user.isAdminOrGlobalMod(socket.uid); if (!isAdminOrGlobalMod) { throw new Error('[[error:no-privileges]]'); }