From c47ec545d87e622aa950e653e4f91721d79bb049 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 21 May 2018 13:58:47 +0200 Subject: Add command to change avatar and channel name Fix bug where application crashes when deleting message, improve url parsing for messages --- include/Channel.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/Channel.hpp') diff --git a/include/Channel.hpp b/include/Channel.hpp index 26b5286..5f5699e 100644 --- a/include/Channel.hpp +++ b/include/Channel.hpp @@ -26,7 +26,9 @@ namespace dchat ADD_MESSAGE, EDIT_MESSAGE, DELETE_MESSAGE, - NICKNAME_CHANGE + NICKNAME_CHANGE, + CHANGE_AVATAR, + CHANGE_CHANNEL_NAME }; class Channel @@ -49,6 +51,7 @@ 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 addSystemMessage(const std::string &msg, bool plainText = true); void addMessage(const std::string &msg); void deleteLocalMessage(const odhtdb::Hash &id, const odhtdb::Signature::PublicKey &requestedByUser); void deleteMessage(const odhtdb::Hash &id, const odhtdb::Signature::PublicKey &requestedByUser); @@ -57,6 +60,9 @@ namespace dchat bool addUser(const odhtdb::Signature::PublicKey &userId, const odhtdb::DataView &groupId); void replaceLocalUser(OnlineLocalUser *newOnlineLocalUser); void changeNick(const std::string &newNick); + void setAvatar(const std::string &newAvatarUrl); + void setNameLocally(const std::string &name); + void setName(const std::string &name); void processEvent(const sf::Event &event, Cache &cache); void draw(sf::RenderWindow &window, Cache &cache); -- cgit v1.2.3