Skip to main content

tuwunel_admin/query/account_data/
mod.rs

1mod account_data_get;
2mod changes_since;
3
4use clap::Subcommand;
5use ruma::{OwnedRoomId, OwnedUserId};
6use tuwunel_core::Result;
7
8use crate::admin_command_dispatch;
9
10#[admin_command_dispatch]
11#[derive(Debug, Subcommand)]
12/// All the getters and iterators from src/service/account_data/
13pub(crate) enum AccountDataCommand {
14	/// - Returns all changes to the account data that happened after `since`.
15	ChangesSince {
16		/// Full user ID
17		user_id: OwnedUserId,
18		/// UNIX timestamp since (u64)
19		since: u64,
20		/// Optional room ID of the account data
21		room_id: Option<OwnedRoomId>,
22	},
23
24	/// - Searches the account data for a specific kind.
25	AccountDataGet {
26		/// Full user ID
27		user_id: OwnedUserId,
28		/// Account data event type
29		kind: String,
30		/// Optional room ID of the account data
31		room_id: Option<OwnedRoomId>,
32	},
33}