fix: missing await in SocketPosts.changeOwner

v1.18.x
Barış Soner Uşaklı 5 years ago committed by Julian Lam
parent dd440ce902
commit 0ae1eb4f6e

@ -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]]');
}

Loading…
Cancel
Save