diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-09-28 08:41:06 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-09-28 08:41:06 +0200 |
commit | cdce40f31f775e609b2ec7dbda685ac6a9b9cde3 (patch) | |
tree | 64c52db974fda067be06acb124a0f2d9ed2fa7d5 | |
parent | 31c72a8ed620904867755b5370d881053ba060a7 (diff) | |
download | libquotient-cdce40f31f775e609b2ec7dbda685ac6a9b9cde3.tar.gz libquotient-cdce40f31f775e609b2ec7dbda685ac6a9b9cde3.zip |
SyncData: drop a shortcut that led to ignoring invites
Fixes #510.
-rw-r--r-- | lib/syncdata.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index 70c4a15f..a3809469 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -184,11 +184,7 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir) auto rooms = json.value("rooms"_ls).toObject(); auto totalRooms = 0; auto totalEvents = 0; - // The first comparison shortcuts the loop when not all states are there - // in the response (anything except "join" is only occasional, and "join" - // intentionally comes first in the enum). - for (size_t i = 0; int(i) < rooms.size() && i < JoinStateStrings.size(); - ++i) { + for (size_t i = 0; i < JoinStateStrings.size(); ++i) { // This assumes that JoinState values go over powers of 2: 1,2,4,... const auto joinState = JoinState(1U << i); const auto rs = rooms.value(JoinStateStrings[i]).toObject(); |