aboutsummaryrefslogtreecommitdiff
path: root/plugins/Matrix.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Matrix.hpp')
-rw-r--r--plugins/Matrix.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 9fb35fe..7028e4d 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -76,7 +76,7 @@ namespace QuickMedia {
RelatedEventType related_event_type = RelatedEventType::NONE;
bool notification_mentions_me = false;
bool cache = false;
- bool provisional = false;
+ std::string transaction_id;
time_t timestamp = 0; // In milliseconds
MessageType type;
std::shared_ptr<Message> replaced_by = nullptr;
@@ -204,6 +204,7 @@ namespace QuickMedia {
bool message_contains_user_mention(const std::string &msg, const std::string &username);
bool message_is_timeline(Message *message);
void body_set_selected_item(Body *body, BodyItem *selected_item);
+ std::string create_transaction_id();
enum class MatrixPageType {
ROOM_LIST,
@@ -459,7 +460,8 @@ namespace QuickMedia {
// TODO: Make api better.
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, std::string &event_id_response);
+ // If |custom_transaction_id| is empty, then a new transaction id is generated
+ PluginResult post_reply(RoomData *room, const std::string &body, void *relates_to, std::string &event_id_response, const std::string &custom_transaction_id = "");
// |relates_to| is from |BodyItem.userdata| and is of type |Message*|
PluginResult post_edit(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*|