aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 776db5c..9d8c6aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -453,8 +453,6 @@ int main(int argc, char **argv)
sibs::SafeSerializer serializer;
serializer.add((const u8*)keyPair->getPublicKey().getData(), keyPair->getPublicKey().getSize());
- localNodeUsers[*nodeHash] = { encryptionKey, keyPair };
-
const char *msg = "please let me join";
odhtdb::Encryption encryptedJoinMsg(odhtdb::DataView((void*)msg, strlen(msg)), encryptionKey->getView());
sibs::SafeSerializer encryptedDataSerializer;
@@ -500,6 +498,7 @@ int main(int argc, char **argv)
shared_ptr<odhtdb::OwnedByteArray> channelEncryptionKey = make_shared<odhtdb::OwnedByteArray>(new u8[channelEncryptionKeyRaw.size], channelEncryptionKeyRaw.size);
memcpy(channelEncryptionKey->data, channelEncryptionKeyRaw.data, channelEncryptionKeyRaw.size);
odhtdb::DatabaseNode databaseNode(channelEncryptionKey, nodeHash);
+ localNodeUsers[*nodeHash] = { channelEncryptionKey, keyPair };
database->storeNodeInfoForUserEncrypted(databaseNode, currentUsername, currentPassword, *keyPair);
printf("Got a response from a person in the channel, we might get added...\n");
waitingToJoinChannels.push_back(databaseNode);