diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-06-13 17:59:25 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-06-13 17:59:25 +0200 |
commit | 3554a838c2318863f59ad4b50a17edc19b5cb94a (patch) | |
tree | 1d9e6b25ef8124a0b15733c76cfb7321c71956f6 /src/plugins | |
parent | ac58f524a8a734e9ea6a8c5acc063891f480d58d (diff) |
Matrix: add send_typing_notifications config
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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()); |