aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-16 22:59:31 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-16 22:59:33 +0200
commit3fc2712c460c90f33e9cb9b1d4729447b2ae95dd (patch)
tree96c4c6d5355f9dfc44f8c12d6b66cf25d8aa4f55
parent03f28433a106d0407965a1e7dc7794da38478691 (diff)
Fix bug when adding user to channel (invite key)
m---------depends/odhtdb0
-rw-r--r--src/main.cpp4
2 files changed, 2 insertions, 2 deletions
diff --git a/depends/odhtdb b/depends/odhtdb
-Subproject 82b551fad6712461bfaaa67ade44aa6091c9cf8
+Subproject c8f015c546d095857fde0f5fbef95156ce99369
diff --git a/src/main.cpp b/src/main.cpp
index 56c38a6..f8820f3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -396,13 +396,13 @@ int main(int argc, char **argv)
serializer.add((const u8*)encryptedChannelKey.getCipherText().data, encryptedChannelKey.getCipherText().size);
const auto &localUserPublicKey = static_cast<OnlineLocalUser*>(currentChannel->getLocalUser())->getPublicKey();
auto localUserGroups = database->getUserGroups(*currentChannel->getNodeInfo().getRequestHash(), localUserPublicKey);
- if(!localUserGroups.empty())
+ if(localUserGroups.empty())
{
fprintf(stderr, "No group to add user to...\n");
return sibs::SafeSerializer();
}
lock_guard<recursive_mutex> lock(channelMessageMutex);
- currentChannel->addUser(localUserPublicKey, localUserGroups[0].getView());
+ currentChannel->addUser(userToAddPublicKey, localUserGroups[0].getView());
return serializer;
}
catch(std::exception &e)