Merge remote-tracking branch 'yerba/main'

This commit is contained in:
Dessalines 2021-02-18 16:19:39 -05:00
commit 9845366a36
2 changed files with 3 additions and 2 deletions

View File

@ -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<PersonExt>),
Group(Box<GroupExt>),

View File

@ -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::<Text, _>(community_actor_id),
.bind::<Text, _>(community_actor_id)
.sql(" ORDER BY activity.id DESC"),
)
.limit(20)
.get_results(conn)?;