Always return a value instead of a promise
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-04-06 14:06:53 +02:00
parent cd098235bb
commit 3ed116d614
1 changed files with 5 additions and 2 deletions

View File

@ -30,8 +30,11 @@ module.exports = Self => {
const sender = await models.Account.findById(accessToken.userId);
const recipient = to.replace('@', '');
if (sender.name != recipient)
return sendMessage(sender, to, message);
if (sender.name != recipient) {
await sendMessage(sender, to, message);
return true;
}
return false;
};