aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-02-11 22:23:58 +0100
committerdec05eba <dec05eba@protonmail.com>2021-02-11 22:26:41 +0100
commitba0f42d30f87ca80ac933137cba5995f4f2c39bf (patch)
tree9927c96454c2f047e68f1e6a09d949e456d66350 /plugins
parent41d7a62457a48d7d76a226bb7bd3d562500dddc2 (diff)
Matrix: mark local edit/reply as read
Diffstat (limited to 'plugins')
-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*|