Skip to main content

tuwunel_admin/query/presence/
mod.rs

1mod get_presence;
2mod presence_since;
3
4use clap::Subcommand;
5use ruma::OwnedUserId;
6use tuwunel_core::Result;
7
8use crate::admin_command_dispatch;
9
10#[admin_command_dispatch(handler_prefix = "presence")]
11#[derive(Debug, Subcommand)]
12/// All the getters and iterators from src/service/presence/
13pub(crate) enum PresenceCommand {
14	/// - Returns the latest presence event for the given user.
15	GetPresence {
16		/// Full user ID
17		user_id: OwnedUserId,
18	},
19
20	/// - Iterator of the most recent presence updates that happened after the
21	///   event with id `since`.
22	PresenceSince {
23		/// UNIX timestamp since (u64)
24		since: u64,
25
26		/// Upper-bound of since
27		to: Option<u64>,
28	},
29}