From bdd59db282b0220cb71ef2b17e5227a0891fc80e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 21 May 2021 04:36:49 +0200 Subject: Cache pinned events that have been deleted --- src/plugins/Matrix.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 15a7676..3144232 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -3382,7 +3382,7 @@ namespace QuickMedia { const rapidjson::Value &errcode_json = GetMember(json_root, "errcode"); if(errcode_json.IsString()) { - if(strcmp(errcode_json.GetString(), "M_FORBIDDEN") == 0) + if(strcmp(errcode_json.GetString(), "M_FORBIDDEN") == 0 || strcmp(errcode_json.GetString(), "M_NOT_FOUND") == 0) return true; else return false; @@ -3410,13 +3410,6 @@ namespace QuickMedia { return nullptr; } - const rapidjson::Value &errcode_json = GetMember(json_root, "errcode"); - if(errcode_json.IsString() && strcmp(errcode_json.GetString(), "M_FORBIDDEN") == 0) { - fprintf(stderr, "You don't have permission to access event %s\n", event_id.c_str()); - room->fetched_messages_by_event_id.insert(std::make_pair(event_id, nullptr)); - return nullptr; - } - const rapidjson::Value &error_json = GetMember(json_root, "error"); if(error_json.IsString()) { fprintf(stderr, "Matrix::get_message_by_id for event id: %s, error: %s\n", event_id.c_str(), error_json.GetString()); -- cgit v1.2.3