aboutsummaryrefslogtreecommitdiff
path: root/src/Room.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-04-07 17:15:42 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:38:23 +0200
commit983be4253f2ea3827d78db97afcc666664ae75ed (patch)
tree058174a46ebe3eac15467f0c9f2d0ca58cecdb2d /src/Room.cpp
parent18c27df9d7efe087c9196b46a47867af9a111b3e (diff)
Update cache signature, update odhtdb
Diffstat (limited to 'src/Room.cpp')
-rw-r--r--src/Room.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Room.cpp b/src/Room.cpp
index b526833..b558f87 100644
--- a/src/Room.cpp
+++ b/src/Room.cpp
@@ -101,10 +101,11 @@ namespace dchat
publicKeyToKeyPairMap[user->publicKey] = keyPair;
odhtdb::Log::debug("Local user set to %s for room %s", user->publicKey.toString().c_str(), id->toString().c_str());
- // Room id + room encryption key + invite key checksum (to verify invite key is not types incorrectly)
+ // Room id + room encryption key + invite key checksum (to verify invite key is not typed incorrectly)
inviteKey = id->toString() + odhtdb::bin2hex((const char*)encryptionKey->data, encryptionKey->size);
inviteKey += getInviteKeyChecksum(inviteKey);
odhtdb::InfoHash inviteInfoHash = odhtdb::InfoHash::generateHash((const u8*)inviteKey.data(), inviteKey.size());
+ // TODO: Use database instead of custom message. Then both parties dont have to be online to add user to room
rooms->database->receiveCustomMessage(inviteInfoHash, [this](const void *data, usize size)
{
sibs::SafeSerializer serializer;
@@ -464,6 +465,7 @@ namespace dchat
}, address, port, callbackFuncs).detach();
}
+ // TODO: Add logout
void Rooms::loginUser(const std::string &username, const std::string &password)
{
std::lock_guard<std::recursive_mutex> lock(roomModifyMutex);