auto delete messages that are not sent to the applicationID

This commit is contained in:
sairajzero 2020-03-10 17:27:54 +05:30
parent c31dcfbb62
commit f3d29b4a97

View File

@ -8593,7 +8593,7 @@ Bitcoin.Util = {
var promise = new Promise((res,rej) => {
compactIDB.searchData(floGlobals.defaultDisk,filterOptions,`SN_${floGlobals.storedList[i]}`).then(results => {
for(key in results)
if(!(results[key].application in floGlobals.applicationList) || !floGlobals.appSubAdmins[results[key].application].includes(results[key].senderID))
if(!(results[key].application in floGlobals.applicationList) || floGlobals.applicationList[results[key].application] != results[key].receiverID ||!floGlobals.appSubAdmins[results[key].application].includes(results[key].senderID))
compactIDB.removeData(floGlobals.defaultDisk, key, `SN_${floGlobals.storedList[i]}`)
res(`Auto-delete successful for SN_${floGlobals.storedList[i]} from ${deleteStart} to ${deleteEnd}`)
}).catch(error => rej(error))