StreamFeed.removeActivity returns successful response but appears to remove the activity async.
See original GitHub issueRepro Steps:
- Using connected stream-js client, create an instantiated StreamFeed object.
const feed = streamClient.feed('some-feed-name', 'some-stream-user-id);
- Find activity
const beforeRemoveResponse = await streamClient.getActivities({ ids: ['some-activity-id']});
feed.removeActivity(beforeRemoveResponse.results[0].id);
const afterRemoveResponse = await streamClient.getActivities({ ids: ['some-activity-id']});
Expected Behavior:
The afterRemoveResponse
result is empty, as I’ve removed the activity and Stream gave me 200/OK Http response code.
Actual: The activity is still there for some amount of time.
I guess this could be expected behavior or a result of caching, however it is undocumented and coupled with the fact that length of processing appears to vary from near instantaneous to minutes it is something that has sucked up some of my time and not friendly.
gz#7877
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to filter an item from an observable array? - Stack Overflow
I'm able to successfully remove the activity from my database, but refreshing my ui is throwing me. I have tried different versions of ......
Read more >services/java/com/android/server/PackageManagerService.java
All available activities, for your resolving pleasure. ... Log.w(TAG, "Couldn't remove app data directory for package: " ... return new int[] { val...
Read more >Activity formatter - Product Documentation | ServiceNow
The activity formatter provides an easy way to track items not saved with a field in the record, for example, journal fields like...
Read more >Asynchronous Activity - Handle Unexpected Popup Messages
We tried with Parallel Process, however that is not closing when popup appears. Example, Bot tries to type a text in Type into...
Read more >eventsource.cs
Format("Activity dying: {0} -> StartEvent({1})", currentActivityId, eventId)); // remove activity only from current logging scope (af) int dummy; af.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What you did in the snippet is receiving built
group id
for an aggregated/notification feed. That id is pseudo id generated from aggregation format. That’s why activities inside a group is dynamic as new ones are coming and can be changed with ranking too. You don’t want it in general because its usage very limited, IMHO.Use real activity id or foreign id/time pair on client if you want to fetch specific activities. From your snippet,
80204172-3665-11eb-a9c2-0ae838defca7
is the id.client.getActivities({ids: [your_id]})
@shiivan this is expected. Activity is removed from the associated feed so users can’t get it but admin (server-side) can always receive activities, they aren’t removed.
To confirm, you can read the feed and removed activity won’t be there.