diff --git a/Riot/Modules/MatrixKit/Models/Account/MXKAccount.m b/Riot/Modules/MatrixKit/Models/Account/MXKAccount.m index d0047f5f06..728a90fa18 100644 --- a/Riot/Modules/MatrixKit/Models/Account/MXKAccount.m +++ b/Riot/Modules/MatrixKit/Models/Account/MXKAccount.m @@ -2073,6 +2073,11 @@ - (void)checkSyncFilterCompatibility:(MXFilterJSONModel*)syncFilter completion:( mxSession.syncFilterId, syncFilter.JSONDictionary); completion(NO); } + else if (!mxSession.store.allFilterIds.count) + { + MXLogDebug(@"[MXKAccount] There are no filters stored in this session, proceed as if no /sync was done before"); + completion(YES); + } else { // Check the filter is the one previously set diff --git a/changelog.d/5873.bugfix b/changelog.d/5873.bugfix new file mode 100644 index 0000000000..cf3c092802 --- /dev/null +++ b/changelog.d/5873.bugfix @@ -0,0 +1 @@ +MXAccount: Do not clear cache if there are no stored filters