aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-03 22:47:54 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-03 22:48:09 +0100
commit3d019b8dc192dc7a2eff198fa962d52f6bdc3134 (patch)
treed99ce382c93093d98ecf3c567d50adae3d55b239 /include
parentfe99723d0a6374ee20c52b0f96c45452026da519 (diff)
Fix crash when posting message after creating room
Diffstat (limited to 'include')
-rw-r--r--include/dchat/Gif.hpp1
-rw-r--r--include/dchat/Room.hpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/dchat/Gif.hpp b/include/dchat/Gif.hpp
index 9e39473..c870d1c 100644
--- a/include/dchat/Gif.hpp
+++ b/include/dchat/Gif.hpp
@@ -19,6 +19,7 @@ namespace dchat
GifLoadException(const std::string &errMsg) : std::runtime_error(errMsg) {}
};
+ // Gif is in image format ARGB (32-bits in total)
class Gif
{
public:
diff --git a/include/dchat/Room.hpp b/include/dchat/Room.hpp
index 4938aea..5dd0e3f 100644
--- a/include/dchat/Room.hpp
+++ b/include/dchat/Room.hpp
@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
#include <functional>
+#include <mutex>
#include <odhtdb/Database.hpp>
namespace dchat
@@ -26,7 +27,7 @@ namespace dchat
{
DISABLE_COPY(Room)
public:
- Room(Rooms *rooms, std::shared_ptr<odhtdb::Hash> id, std::shared_ptr<odhtdb::OwnedByteArray> encryptionKey);
+ Room(Rooms *rooms, std::shared_ptr<odhtdb::Hash> id);
std::shared_ptr<User> addUser(const odhtdb::Signature::PublicKey &userPublicKey, const odhtdb::DataView groupId);
// Returns null if user doesn't exist in room
std::shared_ptr<User> getUserByPublicKey(const odhtdb::Signature::PublicKey &userPublicKey);
@@ -114,5 +115,6 @@ namespace dchat
std::string currentUsername;
std::string currentUserPassword;
+ std::recursive_mutex roomModifyMutex;
};
} \ No newline at end of file