mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Merge branch 'develop' into client-monorepo
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
import { sendNotification as sendPushNotification } from '../../libs/pushNotifications';
|
||||
import common from '../../../common';
|
||||
import { sentMessage } from '../../libs/inbox';
|
||||
import { highlightMentions } from '../../libs/highlightMentions';
|
||||
|
||||
const { achievements } = common;
|
||||
|
||||
@@ -676,7 +677,7 @@ api.sendPrivateMessage = {
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
||||
const sender = res.locals.user;
|
||||
const { message } = req.body;
|
||||
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'));
|
||||
|
||||
Reference in New Issue
Block a user