diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 9da6185..199cba5 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -3109,10 +3109,10 @@ namespace QuickMedia { return download_result_to_plugin_result(download_result); } - PluginResult Matrix::set_read_marker(RoomData *room, const Message *message) { + PluginResult Matrix::set_read_marker(RoomData *room, const std::string &event_id) { rapidjson::Document request_data(rapidjson::kObjectType); - request_data.AddMember("m.fully_read", rapidjson::StringRef(message->event_id.c_str()), request_data.GetAllocator()); - request_data.AddMember("m.read", rapidjson::StringRef(message->event_id.c_str()), request_data.GetAllocator()); + request_data.AddMember("m.fully_read", rapidjson::StringRef(event_id.c_str()), request_data.GetAllocator()); + request_data.AddMember("m.read", rapidjson::StringRef(event_id.c_str()), request_data.GetAllocator()); request_data.AddMember("m.hidden", false, request_data.GetAllocator()); // What is this for? element sends it but its not part of the documentation. Is it for hiding read receipt from other users? in that case, TODO: make it configurable rapidjson::StringBuffer buffer; @@ -3132,7 +3132,7 @@ namespace QuickMedia { auto me = get_me(room); if(me) - room->set_user_read_marker(me, message->event_id); + room->set_user_read_marker(me, event_id); return PluginResult::OK; } |