atagen

macltok

public
Star0
Watch0

Commit 5572a11e8823

tarball

atagen <boss@atagen.co>2026-10-24 23:16 UTC

1 file changed+8-1
timeline: backfill recent events when reopening rooms
Modified file: src/engine/room.rs+8 additions−1 deletions
@@ -147,7 +147,14 @@ impl RoomActor {
147147 request = self.requests.recv() => match request {
148148 None => return None,
149149 Some(ActorRequest::Close(reply)) => return Some(reply),
150- Some(ActorRequest::Open(reply)) => reply.done(timelines.room.resync().await),
150+ Some(ActorRequest::Open(reply)) => {
151+ match timelines.room.resync().await {
152+ Ok(()) if self.context.initial_history_limit > 0 => {
153+ timelines.room.paginate(self.context.initial_history_limit, Some(reply));
154+ }
155+ result => reply.done(result),
156+ }
157+ }
151158 Some(ActorRequest::Execute(command, reply)) => {
152159 timelines.execute(command, reply, &self.room).await;
153160 }