diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-16 13:32:49 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-16 13:32:49 +0100 |
commit | e68ff632e2f54c705ae1d69033e58a8f2d1ca00c (patch) | |
tree | 24f6d1b220767dd393b7ee62b9267ac958d521a2 /plugins | |
parent | f9608af936c39c57633129a62472d315aef62d9c (diff) |
Matrix: show provisional messages as the message is being sent and received
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 30cfa92..7390062 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -61,7 +61,7 @@ namespace QuickMedia { std::string thumbnail_url; std::string related_event_id; sf::Vector2i thumbnail_size; // Set to {0, 0} if not specified - RelatedEventType related_event_type; + RelatedEventType related_event_type = RelatedEventType::NONE; bool mentions_me = false; time_t timestamp = 0; // In milliseconds MessageType type; @@ -179,7 +179,6 @@ namespace QuickMedia { struct SyncData { Messages messages; std::optional<std::vector<std::string>> pinned_events; - std::optional<std::vector<std::string>> tags; }; using Rooms = std::vector<RoomData*>; @@ -437,13 +436,13 @@ namespace QuickMedia { // |url| should only be set when uploading media. // TODO: Make api better. - PluginResult post_message(RoomData *room, const std::string &body, const std::optional<UploadInfo> &file_info, const std::optional<UploadInfo> &thumbnail_info, const std::string &msgtype = ""); + PluginResult post_message(RoomData *room, const std::string &body, std::string &event_id_response, const std::optional<UploadInfo> &file_info, const std::optional<UploadInfo> &thumbnail_info, const std::string &msgtype = ""); // |relates_to| is from |BodyItem.userdata| and is of type |Message*| - PluginResult post_reply(RoomData *room, const std::string &body, void *relates_to); + PluginResult post_reply(RoomData *room, const std::string &body, void *relates_to, std::string &event_id_response); // |relates_to| is from |BodyItem.userdata| and is of type |Message*| - PluginResult post_edit(RoomData *room, const std::string &body, void *relates_to); + PluginResult post_edit(RoomData *room, const std::string &body, void *relates_to, std::string &event_id_response); - PluginResult post_file(RoomData *room, const std::string &filepath, std::string &err_msg); + PluginResult post_file(RoomData *room, const std::string &filepath, std::string &event_id_response, std::string &err_msg); PluginResult login(const std::string &username, const std::string &password, const std::string &homeserver, std::string &err_msg); PluginResult logout(); |