From 15c4434de0c2cd12e09c2f41e898c0b124194a97 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 8 May 2018 18:06:43 +0200 Subject: Add context menu, add context menu to delete message --- include/Channel.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/Channel.hpp') 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 #include #include +#include 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); -- cgit v1.2.3