diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index f67fb6942..6fa029b70 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -24,6 +24,8 @@ module.exports = Self => { }); Self.sendCheckingPresence = async(ctx, workerId, message) => { + if (!workerId) return false; + const models = Self.app.models; const account = await models.Account.findById(workerId); const userId = ctx.req.accessToken.userId;