pub trait HistoryAccess: Send + Sync {
// Required methods
fn all(&self) -> BoxFuture<'_, Result<Vec<Message>>>;
fn tail(&self, n: usize) -> BoxFuture<'_, Result<Vec<Message>>>;
fn since(&self, message_id: &str) -> BoxFuture<'_, Result<Vec<Message>>>;
fn count(&self) -> BoxFuture<'_, Result<usize>>;
}Expand description
Async read-only access to a room’s chat history.
Respects DM visibility — a plugin invoked by user X will not see DMs between Y and Z.
Required Methods§
Sourcefn all(&self) -> BoxFuture<'_, Result<Vec<Message>>>
fn all(&self) -> BoxFuture<'_, Result<Vec<Message>>>
Load all messages (filtered by DM visibility).
Sourcefn tail(&self, n: usize) -> BoxFuture<'_, Result<Vec<Message>>>
fn tail(&self, n: usize) -> BoxFuture<'_, Result<Vec<Message>>>
Load the last n messages (filtered by DM visibility).