ok
This commit is contained in:
@@ -1719,7 +1719,17 @@ UserSchema.statics.SvuotaTuttiGliAccessiOnlineConToken = async function (idapp)
|
||||
const User = this;
|
||||
|
||||
return await User.updateMany({ idapp },
|
||||
{ $pull: { tokens: { refreshToken: { $exists: false } } } });
|
||||
{
|
||||
$pull: {
|
||||
tokens:
|
||||
{
|
||||
$or: [{ refreshToken: { $exists: false } },
|
||||
{ refreshToken: { $exists: true, $eq: '' } }
|
||||
]
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2484,7 +2494,7 @@ UserSchema.statics.setFriendsCmd = async function (req, idapp, usernameOrig, use
|
||||
if (!disablenotif) {
|
||||
const userDest = await User.getRecLangAndIdByUsername(idapp, usernameDest);
|
||||
const user = await User.getRecLangAndIdByUsername(idapp, usernameOrig);
|
||||
|
||||
|
||||
let msgDest = i18n.__({ phrase: 'HANDSHAKE_SENT_FROM_YOU', locale: userDest.lang }, usernameDest);
|
||||
if (already_stretta)
|
||||
msgDest = i18n.__({ phrase: 'HANDSHAKE_CONFIRMED', locale: userDest.lang }, usernameDest);
|
||||
|
||||
Reference in New Issue
Block a user