Ignore Like(Note) if reaction already exists in database
This commit is contained in:
parent
34b8d05f8b
commit
74a89f6fe9
1 changed files with 7 additions and 2 deletions
|
@ -492,12 +492,17 @@ pub async fn receive_activity(
|
|||
post.id
|
||||
},
|
||||
};
|
||||
create_reaction(
|
||||
match create_reaction(
|
||||
db_client,
|
||||
&author.id,
|
||||
&post_id,
|
||||
Some(&activity.id),
|
||||
).await?;
|
||||
).await {
|
||||
Ok(_) => (),
|
||||
// Ignore activity if reaction is already saved
|
||||
Err(DatabaseError::AlreadyExists(_)) => return Ok(()),
|
||||
Err(other_error) => return Err(other_error.into()),
|
||||
};
|
||||
NOTE
|
||||
},
|
||||
(FOLLOW, _) => {
|
||||
|
|
Loading…
Reference in a new issue