From bd13b51eb83ef95d46960db920a8572766e91789 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 20 May 2021 23:08:44 +0200 Subject: Stop fetching notifications at the end --- src/plugins/Matrix.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/Matrix.cpp') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 7992772..49a3988 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1476,6 +1476,8 @@ namespace QuickMedia { const rapidjson::Value &next_token_json = GetMember(json_root, "next_token"); if(next_token_json.IsString()) set_next_notifications_token(next_token_json.GetString()); + else + set_next_notifications_token("invalid"); return PluginResult::OK; } @@ -2782,6 +2784,7 @@ namespace QuickMedia { const rapidjson::Value &end_json = GetMember(json_root, "end"); if(!end_json.IsString()) { + room_data->set_prev_batch("invalid"); fprintf(stderr, "Warning: matrix messages response is missing 'end', this could happen if we received the very first messages in the room\n"); return PluginResult::OK; } -- cgit v1.2.3