mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-27 01:46:25 -07:00
[API] Better error message
This commit is contained in:
parent
8097083ed6
commit
24691383d6
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ module.exports = (params, user) =>
|
||||||
|
|
||||||
// Myself
|
// Myself
|
||||||
if (new mongo.ObjectID(recipient).equals(user._id)) {
|
if (new mongo.ObjectID(recipient).equals(user._id)) {
|
||||||
return rej('-need-translate-');
|
return rej('cannot send message to myself');
|
||||||
}
|
}
|
||||||
|
|
||||||
recipient = await User.findOne({
|
recipient = await User.findOne({
|
||||||
|
|
Loading…
Reference in a new issue