diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-17 03:34:36 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-17 03:34:36 +0100 |
commit | c36d883a90dac83b5a227ebd2d88b7b868d9f422 (patch) | |
tree | 88bdb4e99e4d5968452275b15add74819bb47bd2 /src/plugins | |
parent | 516ea5d7855c89edc57a7822b72cfc716aed90ae (diff) |
Matrix: attempt to fix fetching previous messages before initial sync is finished fetching old messages
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 199cba5..e53df9c 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -2280,9 +2280,8 @@ namespace QuickMedia { PluginResult Matrix::get_previous_room_messages(RoomData *room_data, bool latest_messages) { std::string from = room_data->get_prev_batch(); - if(latest_messages) - from = "END"; - else if(from.empty()) { + if(from.empty()) { + #if 0 fprintf(stderr, "Info: missing previous batch for room: %s, using /sync next batch\n", room_data->id.c_str()); // TODO: When caching /sync, remember to add lock around getting next_batch! from = get_next_batch(); @@ -2290,6 +2289,8 @@ namespace QuickMedia { fprintf(stderr, "Error: missing next batch!\n"); return PluginResult::OK; } + #endif + from = "END"; } rapidjson::Document request_data(rapidjson::kObjectType); |