From 13a949d9ec0533235160417e729c045ead4046a4 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 18 Feb 2021 16:15:52 +0100 Subject: [PATCH 1/2] Specify order for activities query (fixes #1436) --- crates/db_queries/src/source/activity.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/db_queries/src/source/activity.rs b/crates/db_queries/src/source/activity.rs index b32c8f981..ad71e88dc 100644 --- a/crates/db_queries/src/source/activity.rs +++ b/crates/db_queries/src/source/activity.rs @@ -110,7 +110,8 @@ impl Activity_ for Activity { .sql(" AND activity.data -> 'object' ->> 'type' = 'Create'") .sql(" AND activity.data -> 'object' -> 'object' ->> 'type' = 'Page'") .sql(" AND activity.data ->> 'actor' = ") - .bind::(community_actor_id), + .bind::(community_actor_id) + .sql(" ORDER BY activity.id DESC"), ) .limit(20) .get_results(conn)?; From d3707ad4ef3817205f3cc8002dca0d493ded29d3 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 18 Feb 2021 16:16:18 +0100 Subject: [PATCH 2/2] Fix new compiler warning --- crates/apub/src/fetcher/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/apub/src/fetcher/search.rs b/crates/apub/src/fetcher/search.rs index 9f465f768..a831ac404 100644 --- a/crates/apub/src/fetcher/search.rs +++ b/crates/apub/src/fetcher/search.rs @@ -41,8 +41,8 @@ use log::debug; use url::Url; /// The types of ActivityPub objects that can be fetched directly by searching for their ID. -#[serde(untagged)] #[derive(serde::Deserialize, Debug)] +#[serde(untagged)] enum SearchAcceptedObjects { Person(Box), Group(Box),