Skip to content

Commit

Permalink
Tried to fix catastrohpic merge
Browse files Browse the repository at this point in the history
  • Loading branch information
f-r00t committed May 16, 2024
1 parent 2b62cae commit 9b24a54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
1 change: 1 addition & 0 deletions src/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,7 @@ export async function getGroupMessages(group = false, limit = 25) {
}
console.log(res);
return res.reverse();
}
} else {
console.log('No message le found!');
}
Expand Down
37 changes: 0 additions & 37 deletions src/HuginUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export async function getBestCache(onlyOnline = true) {
}
}

}
if (Globals.preferences.cacheEnabled) toastPopUp('No online APIs!');
Globals.APIOnline = false;
return false;
Expand Down Expand Up @@ -775,14 +774,6 @@ export async function sendMessage(message, receiver, messageKey, temp_timestamp)
updateMessage(temp_timestamp, 'failed');
}

updateMessage(temp_timestamp, 'sent');
backgroundSave();
Globals.lastMessageTimestamp = timestamp;
setLastSyncGroup(timestamp);
} else {
updateMessage(temp_timestamp, 'failed');
}

Globals.updateMessages();

return result;
Expand Down Expand Up @@ -994,34 +985,6 @@ export async function getMessage(extra, hash, navigation, fromBackground = false
}
}

let decryptBox = false;
let createNewPayee = false;

let key = '';

try {
decryptBox = NaclSealed.sealedbox.open(hexToUint(box),
nonceFromTimestamp(timestamp),
getKeyPair().secretKey);
createNewPayee = true;
} catch (err) {
}
if (!decryptBox) {
try {
decryptBox = NaclSealed.sealedbox.open(hexToUint(box),
nonceFromTimestamp(timestamp),
getKeyPairOld().secretKey);
let message_dec_temp = naclUtil.encodeUTF8(decryptBox);
let payload_json_temp = JSON.parse(message_dec_temp);
let from_temp = payload_json_temp.from;
let payee = Globals.payees.filter(item => item.address == from_temp)[0];
Globals.removePayee(payee.nickname, false);
createNewPayee = true;
} catch (err) {
console.log(err);
}
}

console.log('Thats cool we keep goinbg')

let i = 0;
Expand Down

0 comments on commit 9b24a54

Please sign in to comment.