diff --git a/app/lib/methods/sendMessage.js b/app/lib/methods/sendMessage.js index a358f5ba..2a91637a 100644 --- a/app/lib/methods/sendMessage.js +++ b/app/lib/methods/sendMessage.js @@ -144,7 +144,7 @@ export default async function(rid, msg, tmid, user) { _id: user.id || '1', username: user.username }; - if (tmid) { + if (tmid && tMessageRecord) { m.tmid = tmid; m.tlm = messageDate; m.tmsg = tMessageRecord.msg;