fix(webapi): reject mark-seen for future msgs

This commit is contained in:
oxalica 2024-09-21 14:58:51 -04:00
parent bc856f6c62
commit ad3e422902
2 changed files with 25 additions and 1 deletions

View file

@ -738,6 +738,11 @@ async fn last_seen(server: Server) {
.await
.unwrap();
assert_eq!(rooms, RoomList::default());
// Cannot see a future msg.
seen(&ALICE, Id::MAX)
.await
.expect_api_err(StatusCode::BAD_REQUEST, "invalid_request");
}
#[rstest]