Reputation: 903
I feel like this question was almost answered here but the implementation isn't working for me.
I add a comment activity to Thing A's feed and use the to field to notify specific users about the comment.
If I view the data explorer for Thing A I see the comment. I also see the comment in my user's notification feed.
I then delete Thing A by doing the following:
$feed = $client->feed("thing", "a");
$feed->removeActivity($foreignId, true);
// delete from our app DB
Going back to the data explorer I see that the activity is removed from Thing A's feed but still exists in my user's feed. They both share the same foreign id and from what I understand removing an activity from the origin feed using the foreign id will propagate that removal to all affected feeds. I've verified that the foreign id is correct.
I suppose my question is why is this not removing my activity everywhere? Is there something else I need to be doing to remove the activity from the notification feeds?
Upvotes: 2
Views: 582
Reputation: 4988
When I run this piece of code against my personal dev app, it works. It works when thing
is a flat feed and user
is either a flat or a notification feed group.
$feed = $client->feed('thing', 1);
$feed->addActivity([
'actor' => 'user:1',
'verb' => 'like',
'object' => 'post:5',
'foreign_id' => 'like:1',
'to' => ['user:1'],
]);
$feed->removeActivity('like:1', true);
If you keep having issues, please contact getstream at https://getstream.io/contact/ with more specific details (feed group names, ids, activity IDs, ...) for a closer look.
Cheers!
Upvotes: 1