From 1818ee0d0b5c1560fb72681094639e270579bc50 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 1 May 2018 15:28:23 +0200 Subject: Fix again... --- src/main.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 4986e6c..c7dd433 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -165,12 +165,6 @@ int main(int argc, char **argv) database.setOnAddUserCallback([¤tUserKeyPair, &channels, &channelMessageMutex, &waitingToJoin](const odhtdb::DatabaseAddUserRequest &request) { lock_guard lock(channelMessageMutex); - if(currentUserKeyPair && request.userToAdd->getPublicKey() == currentUserKeyPair->getPublicKey()) - { - printf("You were added to channel %s by %s\n", request.nodeHash->toString().c_str(), request.creatorUser->getName().c_str()); - return; - } - for(Channel *channel : channels) { if(*request.nodeHash == *channel->getNodeInfo().getRequestHash()) @@ -178,6 +172,7 @@ int main(int argc, char **argv) User *userToAdd = channel->getUserByPublicKey(request.userToAdd->getPublicKey()); if(userToAdd && currentUserKeyPair && request.userToAdd->getPublicKey() == currentUserKeyPair->getPublicKey() && channel->getLocalUser()->type != User::Type::ONLINE) { + printf("You were added to channel %s by %s\n", request.nodeHash->toString().c_str(), request.creatorUser->getName().c_str()); channel->replaceLocalUser(new OnlineUser(request.userToAdd)); waitingToJoin = false; return; -- cgit v1.2.3