mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
refactor: Fix errors in api/client/context.rs
This commit is contained in:
@@ -12,7 +12,9 @@ use futures::{
|
|||||||
FutureExt, StreamExt, TryFutureExt, TryStreamExt,
|
FutureExt, StreamExt, TryFutureExt, TryStreamExt,
|
||||||
future::{OptionFuture, join, join3, try_join3},
|
future::{OptionFuture, join, join3, try_join3},
|
||||||
};
|
};
|
||||||
use ruma::{OwnedEventId, UserId, api::client::context::get_context, events::StateEventType};
|
use ruma::{
|
||||||
|
OwnedEventId, UserId, api::client::context::get_context, assign, events::StateEventType,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Ruma,
|
Ruma,
|
||||||
@@ -213,7 +215,7 @@ pub(crate) async fn get_context_route(
|
|||||||
.collect()
|
.collect()
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
Ok(get_context::v3::Response {
|
Ok(assign!(get_context::v3::Response::new(), {
|
||||||
event: base_event.map(at!(1)).map(Event::into_format),
|
event: base_event.map(at!(1)).map(Event::into_format),
|
||||||
|
|
||||||
start: events_before
|
start: events_before
|
||||||
@@ -243,5 +245,5 @@ pub(crate) async fn get_context_route(
|
|||||||
.collect(),
|
.collect(),
|
||||||
|
|
||||||
state,
|
state,
|
||||||
})
|
}))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user