summaryrefslogtreecommitdiff
path: root/src/events.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.rs')
-rw-r--r--src/events.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/events.rs b/src/events.rs
index fd73d63..2f5e145 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -15,6 +15,7 @@ use futures::stream::{self, Stream, StreamExt as _, TryStreamExt as _};
use crate::{
app::App,
channel::{app::EventsError, repo::broadcast},
+ clock::RequestedAt,
error::InternalError,
header::LastEventId,
repo::{channel, login::Login},
@@ -32,6 +33,7 @@ struct EventsQuery {
async fn on_events(
State(app): State<App>,
+ RequestedAt(now): RequestedAt,
_: Login, // requires auth, but doesn't actually care who you are
last_event_id: Option<LastEventId>,
Query(query): Query<EventsQuery>,
@@ -50,7 +52,7 @@ async fn on_events(
async move {
let events = app
.channels()
- .events(&channel, resume_at.as_ref())
+ .events(&channel, &now, resume_at.as_ref())
.await?
.map(ChannelEvent::wrap(channel));