From 2e70534967447e1c34c68d21444a81b851bd4d13 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 31 Dec 2024 01:03:54 +0300 Subject: Storage::all_posts to return all posts for ?q=source w/o filters Change-Id: I5d1220b6a2abbcb460bdb13c088c3dbd7e4d9856 --- src/database/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/database/mod.rs') diff --git a/src/database/mod.rs b/src/database/mod.rs index 0993715..4390ae7 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -356,6 +356,10 @@ pub trait Storage: std::fmt::Debug + Clone + Send + Sync { /// Besides, it may even allow for nice tricks like storing the /// webmentions separately and rehydrating them on feed reads. fn add_or_update_webmention(&self, target: &str, mention_type: MentionType, mention: serde_json::Value) -> impl Future> + Send; + + /// Return a stream of all posts ever made by a certain user, in + /// reverse-chronological order. + fn all_posts<'this>(&'this self, user: &url::Url) -> impl Future + Send + 'this>> + Send; } #[cfg(test)] -- cgit 1.4.1