aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-21 04:36:49 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-21 04:36:49 +0200
commitbdd59db282b0220cb71ef2b17e5227a0891fc80e (patch)
treea1f4852248317209ccd2d5fa90436c987d24df28 /src
parent8723a48351e1005c4b23a3c159ea25d86352ec6e (diff)
Cache pinned events that have been deleted
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Matrix.cpp9
1 files changed, 1 insertions, 8 deletions
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());