Scenario:
user:1
created a post:
{ actor: 'user:1', verb: 'POST_CREATE', object: 'post:1', foreign_id: 'post:1' }
Now, user:1
is followed by user:2
, user:3
and user:4
. They all got this post
in their feed. They did following actions on the post:
user:2
commented on it (user:1
got notification using TO
field):
{ actor: 'user:2', verb: 'POST_COMMENT', object: 'comment:1', target: 'post:1', foreign_id: 'comment:1'
TO: ['notification:1']}
user:3
and user:4
liked:
{ actor: 'user:3', verb: 'POST_LIKE', object: 'like:1', target: 'post:1', foreign_id: 'like:1'
TO: ['notification:1', 'notification:2']}
{ actor: 'user:4', verb: 'POST_LIKE', object: 'like:2', target: 'post:1', foreign_id: 'like:2'
TO: ['notification:1', 'notification:2', 'notification:3']}
Question:
Now when user:1
deletes the post, how would I delete all of its activities along with their references in feed and notifications? I want to do it with 1 API call.
If I need to change the activity data, please tell me.
PS:
- I have read the documentation of
delete activity
, it just deletes 1 activity at a time and that too from only 1 feed.. - I am sending
time
with every activity, just didn't add here.