Process events list client side
This commit is contained in:
@@ -48,7 +48,7 @@ impl APIEvent {
|
||||
pub struct APIEventsList {
|
||||
pub start: String,
|
||||
pub end: Option<String>,
|
||||
pub messages: Vec<APIEvent>,
|
||||
pub events: Vec<APIEvent>,
|
||||
}
|
||||
|
||||
/// Get messages for a given room
|
||||
@@ -65,7 +65,7 @@ pub(super) async fn get_events(
|
||||
Ok(APIEventsList {
|
||||
start: messages.start,
|
||||
end: messages.end,
|
||||
messages: stream::iter(messages.chunk)
|
||||
events: stream::iter(messages.chunk)
|
||||
.then(async |msg| APIEvent::from_evt(msg, room.room_id()).await)
|
||||
.collect::<Vec<_>>()
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user