ver 1.0.19
This commit is contained in:
@@ -2158,8 +2158,14 @@ 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);
|
||||
const already_stretta = await User.isMyHandShake(idapp, usernameDest, usernameOrig);
|
||||
const msgDest = i18n.__({ phrase: 'HANDSHAKE_CONFIRMED', locale: userDest.lang }, usernameDest);
|
||||
const msgOrig = i18n.__({ phrase: 'HANDSHAKE_ACCEPTED', locale: user.lang }, usernameOrig);
|
||||
let phrase = 'HANDSHAKE_SET';
|
||||
if (already_stretta) {
|
||||
phrase = 'HANDSHAKE_ACCEPTED';
|
||||
}
|
||||
|
||||
const msgOrig = i18n.__({ phrase, locale: user.lang }, usernameOrig);
|
||||
|
||||
await telegrambot.sendMsgTelegram(idapp, usernameOrig, msgDest);
|
||||
await telegrambot.sendMsgTelegram(idapp, usernameDest, msgOrig);
|
||||
@@ -3953,7 +3959,7 @@ UserSchema.statics.getUsersDreams = async function (idapp) {
|
||||
UserSchema.statics.getLastUsers = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
const lastn = await Settings.getValDbSettings(idapp, 'SHOW_LAST_N_USERS', 5);
|
||||
const lastn = await Settings.getValDbSettings(idapp, 'SHOW_LAST_N_USERS', 10);
|
||||
|
||||
return await User.find(
|
||||
{
|
||||
@@ -3981,7 +3987,7 @@ UserSchema.statics.getLastUsers = async function (idapp) {
|
||||
UserSchema.statics.getLastOnlineUsers = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
const lastn = await Settings.getValDbSettings(idapp, 'SHOW_LAST_ONLINE_USERS', 10);
|
||||
const lastn = await Settings.getValDbSettings(idapp, 'SHOW_LAST_ONLINE_USERS', 20);
|
||||
|
||||
return await User.find(
|
||||
{
|
||||
@@ -4523,7 +4529,7 @@ UserSchema.statics.calcnumRegUntilDay = async function (idapp) {
|
||||
UserSchema.statics.calcRegDaily = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
return await User.aggregate(User.getUsersRegDaily(idapp, 60)).then(ris => {
|
||||
return await User.aggregate(User.getUsersRegDaily(idapp, 90)).then(ris => {
|
||||
// console.table(ris);
|
||||
return ris;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user