diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-08 18:06:43 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-05-08 18:06:51 +0200 |
commit | 15c4434de0c2cd12e09c2f41e898c0b124194a97 (patch) | |
tree | 0bf01cd49a22b7aa79304ed0e9d34ac265d8393c /include/Channel.hpp | |
parent | 4f6c843523f45708d8bbed25b3677f69c4208a38 (diff) |
Add context menu, add context menu to delete message
Diffstat (limited to 'include/Channel.hpp')
-rw-r--r-- | include/Channel.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/Channel.hpp b/include/Channel.hpp index 1acfcd1..7d4cb08 100644 --- a/include/Channel.hpp +++ b/include/Channel.hpp @@ -9,6 +9,7 @@ #include <odhtdb/DatabaseNode.hpp> #include <odhtdb/Signature.hpp> #include <odhtdb/Group.hpp> +#include <odhtdb/Hash.hpp> namespace odhtdb { @@ -19,7 +20,9 @@ namespace dchat { enum class ChannelDataType : u8 { - MESSAGE, + ADD_MESSAGE, + EDIT_MESSAGE, + DELETE_MESSAGE, NICKNAME_CHANGE }; @@ -42,7 +45,11 @@ namespace dchat // If timestamp is 0, then current time is used void addLocalMessage(const std::string &msg, User *owner, u64 timestampSeconds = 0); + void addLocalMessage(const std::string &msg, User *owner, u64 timestampSeconds, const odhtdb::Hash &id); void addMessage(const std::string &msg); + void deleteLocalMessage(const odhtdb::Hash &id); + void deleteMessage(const odhtdb::Hash &id); + void addUserLocally(User *user); bool addUser(const odhtdb::Signature::PublicKey &userId, const std::string &groupId); void replaceLocalUser(User *newLocalUser); |