- proxy id not requested properly
This commit is contained in:
sairajzero 2022-07-26 15:37:09 +05:30
parent af34c5ed69
commit a506cd0d8d
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ function processNoteFromUser(data) {
}
function checkIfRequestSatisfy(request, data) {
if (!request || request.mostRecent || request.receiverID !== data.receiverID)
if (!request || request.mostRecent || request.receiverID !== (data.proxyID || data.receiverID))
return false;
if (request.atVectorClock && request.atVectorClock !== data.vectorClock)
return false;

View File

@ -296,7 +296,7 @@ function Database(user, password, dbname, host = 'localhost') {
if (request.afterTime)
conditionArr.push(`${L_struct.LOG_TIME} > ${request.afterTime}`);
conditionArr.push(`${H_struct.APPLICATION} = '${request.application}'`);
conditionArr.push(`IFNULL(${L_struct.PROXY_ID}, ${H_struct.RECEIVER_ID}) = '${request.receiverID}'`);
conditionArr.push(`IFNULL(${L_struct.PROXY_ID}, ${H_struct.RECEIVER_ID}) = '${cloud.proxyID(request.receiverID)}'`);
if (request.comment)
conditionArr.push(`${B_struct.COMMENT} = '${request.comment}'`);
if (request.type)