Adding a comment.
This commit is contained in:
parent
85cdcc5f13
commit
9dfccdd713
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,8 @@ async fn receive_create_post(
|
||||||
|
|
||||||
let post = PostForm::from_apub(&page, client, pool, Some(user.actor_id()?)).await?;
|
let post = PostForm::from_apub(&page, client, pool, Some(user.actor_id()?)).await?;
|
||||||
|
|
||||||
|
// Using an upsert, since likes (which fetch the post), sometimes come in before the create
|
||||||
|
// resulting in double posts.
|
||||||
let inserted_post = blocking(pool, move |conn| upsert_post(&post, conn)).await??;
|
let inserted_post = blocking(pool, move |conn| upsert_post(&post, conn)).await??;
|
||||||
|
|
||||||
// Refetch the view
|
// Refetch the view
|
||||||
|
|
Loading…
Reference in a new issue