ver: 0.5.55

Strette di Mano OK
This commit is contained in:
Surya Paolo
2023-01-09 02:37:35 +01:00
parent 331c2e6780
commit a4b42a1fc3
9 changed files with 33 additions and 256 deletions

View File

@@ -213,18 +213,9 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif) {
}
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_HANDSHAKE) {
recnotif.openUrl = '/my/' + userorig;
if (recnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_NEW_REC) {
newdescr = i18n.__('<strong>%s</strong> asked you HandShake', userorig, mydescr);
tag = 'newhandshake';
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_ACCEPTED) {
newdescr = i18n.__('<strong>%s</strong> accepted your HandShake', userorig, mydescr);
if (recnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_ACCEPTED) {
newdescr = i18n.__('HANDSHAKE_SET', userorig, mydescr);
tag = 'acceptedhandshake';
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_ACCEPTED_MY_REQUEST) {
newdescr = i18n.__('✅ You have accepted %s HandShake request!', userorig, mydescr);
tag = 'acceptedhandshake';
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_REFUSED) {
newdescr = i18n.__('<strong>%s</strong> refused your HandShake', userorig, mydescr);
tag = 'refusedhandshake';
}
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS) {
tag = 'group';
@@ -522,19 +513,6 @@ sendNotifSchema.statics.updateStatusAndDescr = async function (myrecnotif, onlys
newstatus = shared_consts.StatusNotifs.STATUS_FRIENDS_REFUSED;
dest = myrecnotif.sender;
}
} else if (myrecnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_HANDSHAKE) {
typeidsearch = shared_consts.TypeNotifs.ID_HANDSHAKE_NEW_REC;
if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_ACCEPTED) {
newstatus = shared_consts.StatusNotifs.STATUS_HANDSHAKE_ACCEPTED;
dest = myrecnotif.sender;
} else if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_ACCEPTED_MY_REQUEST) {
newstatus = shared_consts.StatusNotifs.STATUS_HANDSHAKE_ACCEPTED;
newdest = myrecnotif.sender;
sender = myrecnotif.dest;
} else if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_HANDSHAKE_REFUSED) {
newstatus = shared_consts.StatusNotifs.STATUS_HANDSHAKE_REFUSED;
dest = myrecnotif.sender;
}
} else if (myrecnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS) {
typeidsearch = shared_consts.TypeNotifs.ID_GROUP_NEW_REC;
dest = myrecnotif.dest;