diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-21 13:58:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-05-21 14:00:09 +0200 |
commit | c47ec545d87e622aa950e653e4f91721d79bb049 (patch) | |
tree | e74c2ba840d7d32a4d20e73f4d318f0f3a8b5c44 /include/Channel.hpp | |
parent | 8052fe6d6170ccbec9052b89e331ae786c69ee05 (diff) |
Add command to change avatar and channel name
Fix bug where application crashes when deleting message,
improve url parsing for messages
Diffstat (limited to 'include/Channel.hpp')
-rw-r--r-- | include/Channel.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
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); |