Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
silkroadnomad committed Apr 1, 2024
1 parent e117786 commit d11e7cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/network/p2p-operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,18 @@ async function processMessageQueue() {
if(messageObj.onBoardingToken!==undefined){
//TODO "mytoken" should be a unique sessionId
const onBoardingSignatureValid = await _orbitdb.identity.verify(messageObj.onBoardingToken, _orbitdb.identity.publicKey, "mytoken")

console.log("onBoardingSignatureValid",onBoardingSignatureValid)
if(onBoardingSignatureValid){
await writeMyAddressIntoRequesterDB(requesterDB);
await requestAddress( messageObj.sender,true ) //we request the address //TODO we should do that only when the checkbox is enabled in the onboardingtoken
// Remove the message from the queue after processing
initReplicationBackup( _orbitdb.identity.id ) //init replication of all subscriber ids
delete messageQueue[sender];
}
else {
notify(`onboarding signature was not valid - somebody wanted to steal your contact data`);
return //don't do anything
}
continue; //if this was an invitation that was all we have todo
}
else{
activeConfirmations[sender] = true; // Mark this sender as having an active confirmation
Expand Down

0 comments on commit d11e7cd

Please sign in to comment.