mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
Fix sending private messages
This commit is contained in:
parent
e9d5123f8a
commit
59dbd12576
1 changed files with 1 additions and 1 deletions
|
|
@ -633,7 +633,7 @@ api.sendPrivateMessage = {
|
|||
if (validationErrors) throw validationErrors;
|
||||
|
||||
const sender = res.locals.user;
|
||||
const message = await highlightMentions(req.body.message);
|
||||
const message = (await highlightMentions(req.body.message))[0];
|
||||
const receiver = await User.findById(req.body.toUserId).exec();
|
||||
if (!receiver) throw new NotFound(res.t('userNotFound'));
|
||||
if (!receiver.flags.verifiedUsername) delete receiver.auth.local.username;
|
||||
|
|
|
|||
Loading…
Reference in a new issue