Skip to main content

tuwunel_admin/query/users/
get_to_device_events.rs

1use futures::stream::StreamExt;
2use ruma::{OwnedDeviceId, OwnedUserId};
3use tuwunel_core::Result;
4
5use crate::admin_command;
6
7#[admin_command]
8pub(super) async fn get_to_device_events(
9	&self,
10	user_id: OwnedUserId,
11	device_id: OwnedDeviceId,
12) -> Result {
13	let query = self
14		.services
15		.users
16		.get_to_device_events(&user_id, &device_id, None, None)
17		.collect::<Vec<_>>();
18
19	self.write_timed_query(query).await
20}