permalink loadMore: do not endlessly retry on M_UNKNOWN error

Currently getting this after
"[rich replies] matrix-sdk: Ensure correct room for events loaded by
chunks"

Change-Id: I6658a9ed9e5df6d1cca580f2e83fff4a86d3383a
This commit is contained in:
SpiritCroc 2023-02-23 19:59:32 +01:00
parent af720cdab9
commit 84684f24ea

View file

@ -249,7 +249,7 @@ internal class LoadTimelineStrategy constructor(
getContextLatch?.await()
getContextLatch = null
} catch (failure: Throwable) {
if (failure is Failure.ServerError && failure.error.code in listOf(MatrixError.M_NOT_FOUND, MatrixError.M_FORBIDDEN)) {
if (failure is Failure.ServerError && failure.error.code in listOf(MatrixError.M_NOT_FOUND, MatrixError.M_FORBIDDEN, MatrixError.M_UNKNOWN)) {
// This failure is likely permanent, so handle in DefaultTimeline to restart without eventId
throw failure
}