diff options
author | Felix Ableitner <me@nutomic.com> | 2020-05-30 20:05:42 +0200 |
---|---|---|
committer | Felix Ableitner <me@nutomic.com> | 2020-05-30 20:05:42 +0200 |
commit | f3aba6da92702b2039c51ad54aef8c5cb0a8ecf2 (patch) | |
tree | b37bf3bd9eba300955261e39b07987b410465cf3 /server/src/apub/community.rs | |
parent | c34cc46c2df4c44060d8badb74a8fb578933a1fd (diff) |
fix comment notifications
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r-- | server/src/apub/community.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs index 6ed10f3b..9cd65334 100644 --- a/server/src/apub/community.rs +++ b/server/src/apub/community.rs @@ -384,8 +384,7 @@ pub async fn get_apub_community_followers( impl Community { pub fn do_announce<A>( activity: A, - // TODO: maybe pass in the community object - community_uri: &str, + community: &Community, sender: &str, conn: &PgConnection, is_local_activity: bool, @@ -393,8 +392,6 @@ impl Community { where A: Activity + Base + Serialize + Debug, { - let community = Community::read_from_actor_id(conn, &community_uri)?; - insert_activity(&conn, -1, &activity, is_local_activity)?; let mut announce = Announce::default(); @@ -417,7 +414,7 @@ impl Community { // this seems to be the "easiest" stable alternative for remove_item() to.retain(|x| *x != sending_user.get_shared_inbox_url()); - send_activity(&announce, &community, to)?; + send_activity(&announce, community, to)?; Ok(HttpResponse::Ok().finish()) } |