diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Config.cpp | 1 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/Config.cpp b/src/Config.cpp index bdc4012..fe4e984 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -231,6 +231,7 @@ namespace QuickMedia { 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); + get_json_value(matrix_json, "send_typing_notifications", config->matrix.send_typing_notifications); } if(!has_known_matrix_homeservers_config) diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index b2b05e2..16dd098 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -5413,6 +5413,9 @@ namespace QuickMedia { } PluginResult Matrix::on_start_typing(RoomData *room) { + if(!QuickMedia::get_config().matrix.send_typing_notifications) + return PluginResult::OK; + rapidjson::Document request_data(rapidjson::kObjectType); request_data.AddMember("typing", true, request_data.GetAllocator()); request_data.AddMember("timeout", 30000, request_data.GetAllocator()); // 30 sec timeout @@ -5434,6 +5437,9 @@ namespace QuickMedia { } PluginResult Matrix::on_stop_typing(RoomData *room) { + if(!QuickMedia::get_config().matrix.send_typing_notifications) + return PluginResult::OK; + rapidjson::Document request_data(rapidjson::kObjectType); request_data.AddMember("typing", false, request_data.GetAllocator()); |