diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-06-12 15:48:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-06-12 15:48:17 +0200 |
commit | ac58f524a8a734e9ea6a8c5acc063891f480d58d (patch) | |
tree | 16445dccf42d1ebd6dcac19c40add653328e4c4b /src | |
parent | cdddd4250c0fd6cb6b8e0fe7f8810a83df7d48c4 (diff) |
Matrix: add option to disable sending read receipt, comment the example json config file
Diffstat (limited to 'src')
-rw-r--r-- | src/Config.cpp | 1 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Config.cpp b/src/Config.cpp index 6c921df..bdc4012 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -230,6 +230,7 @@ namespace QuickMedia { get_json_value(matrix_json, "gpg_user_id", config->matrix.gpg_user_id); get_json_value(matrix_json, "room_name_font_size", config->matrix.room_name_font_size); get_json_value(matrix_json, "room_description_font_size", config->matrix.room_description_font_size); + get_json_value(matrix_json, "send_read_receipts", config->matrix.send_read_receipts); } if(!has_known_matrix_homeservers_config) diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 127a664..b2b05e2 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -5456,7 +5456,8 @@ namespace QuickMedia { PluginResult Matrix::set_read_marker(RoomData *room, const std::string &event_id, int64_t event_timestamp) { rapidjson::Document request_data(rapidjson::kObjectType); 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()); + if(QuickMedia::get_config().matrix.send_read_receipts) + request_data.AddMember("m.read", rapidjson::StringRef(event_id.c_str()), request_data.GetAllocator()); rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); |