Merge branch 'krille/cannot-request-history-without-prevbatch' into 'main'

fix: canRequestHistory should return false if prev_batch is null

See merge request famedly/company/frontend/famedlysdk!1311
This commit is contained in:
td 2023-06-12 05:37:52 +00:00
commit b27222106d
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class Timeline {
bool get canRequestHistory {
if (events.isEmpty) return true;
return events.last.type != EventTypes.RoomCreate;
return room.prev_batch != null && events.last.type != EventTypes.RoomCreate;
}
Future<void> requestHistory(