Our system is set up for users to create and assign tasks to themselves and others. Each user has a notification feed that follows feeds of tasks which they are assigned or involved with.
When we delete tasks we also want the task feed and all activities to be deleted. We are deleting feeds like so:
$client = new GetStream\Stream\Client($client, $secret);
$taskFeed = $client->feed("task", 1234);
$taskFeed->delete();
However, when I look at the data explorer I still see activities related to the task in the notification feeds.
Unfollowing everyone from the task feed doesn't seem possible; the docs seem to suggest a limit of retrieving 500 followers.
What's the proper way to handle this? Do I need to remove every activity individually using the foreign_ids?
Deleting a feed won't remove the activities that were previously added to it. They may have been replicated into other feeds via following relationships or targeting via the 'to' field.
You're correct that removing activities by foreign_id is the way to go.
Related
Let's say I want to build a system where each user has access to a notification feed and an aggregated feed, with the following groups:
user as flat feed
hashtag as flat feed
notification as notification feed
timeline as aggregated feed
We also have the following relations:
user:b follows hashtag:a
user:b follows user:a
Now consider the following situation:
If user A posts with hashtag A, I would like user B to get an activity in its notification feed (thanks to relation 1). But I also would also like all followers of user A to see in their timeline that user A did something. Then, user B will get the activity in its notification feed, and in its timeline (because of relation 2): there is a duplicate.
Is there a way to avoid this situation ?
A naive way would be to manually filter the feed and prune the aggregated activities we do not want to see. But this of course seems non optimal.
Thank you very much!
You can use discard rules to avoid activities matching one of rule from getting added to a follower's feed.
This is usually something you use to avoid own activities from showing up in your notification feed.
Here's the link to the docs on Discard Rules:
https://getstream.io/docs/#discard-rules
We are building Feed Groups similar to Facebook Groups and we want admin and moderator functionalities to be implemented. How can we implement such functionality?
Presently, we thought of two ways,
1) Have a separate feed group UnApprovedFeed for unapproved posts and once the feed from UnApprovedFeed gets approved, it gets deleted from UnApprovedFeed and gets published to Normal FeedGroup,
2) Have an extra boolean object Approved to the activity, and filter based upon it, If approved the boolean is true else false.
Or is there any available abstraction for moderators already in Stream?
both of your ideas will work, but the second option is what we've seen most frequently (and what we've done ourselves in a few projects our services team have done for customers). You can have your front end query that field and just not display.
I had to delete and re-add some activities.
Details:
GROUP_AGGREGATED follows GROUP
I deleted all GROUP_JOIN activities from feed GROUP. Then re-added all of them with some changes, but I didn't change the time.
GROUP_AGGREGATED had other activities too in it, and GROUP_JOIN was in between somewhere. But after re-adding, all the re-added activities appeared as the latest. GetStream didn't use my time field.
Aggregated feeds return results only in the order that they are added, unlike in Flat feeds in which you are able to add activities which occur in the past and they will show up in chronological order.
I've made a note to add more documentation about this in the official docs!
I have a new Windows Application that I am adding Application Insights to. Adding a new chart gives the ability to Group on specific custom properties using a drop down. This drop down has 65 properties that AI must have added at some point. There were not specifically added.
We have a main AppInsights that takes all events. We've also created a AppInsight for development. The list of custom properties in the drop down is different between these two, even though the source code is the same.
It makes me suspect that there is some process that creates the drop down contents based on the incoming data.
The problem here is that the code has changed, and some properties are no longer available. We want to eliminate these values from the drop down, and add the new ones.
I am perfectly happy just deleting the entire list. Is there a way to do this?
The items that are available in the group by are properties that have ever been received by the back end in data you've sent, and aren't editable.
for custom properties/metrics, there's a limit on how many properties the backend will allow before it stops collecting new named custom properties. Conceptually, think of it as the backend storing an array of 200 elements for each telemetry item you sent, and mapping each custom property name to an index, and that mapping lasts forever. (i believe at the current time that limit is 200 each, but we're working on expanding that)
so if developers did things in your dev portal, even sent one item with custom property "foo", then that property will be there forever, and takes up one of those 200 slots. They can't be deleted or cleared at the moment.
Also, the contents of the group by box is also limited to events that have sent less than some threshold of distinct values, too. (I'm not sure on that exact value, but i believe it < 100 distinct values.) So fields like Id fields, or guids, etc, will eventually stop showing up as group by options, because the group by would create N distinct buckets of 1 item.
It seems like this would be something already mentioned in the App Insights UserVoice site, or documented in the azure documentation for group by but i'm not seeing it.
The only real workaround at this time is to create a new application insights resource in azure, and start submitting data to that new resource instead of your old one. And then you have to be proactive about never submitting custom properties that you're never going to use, or mixing case, as "Property1" and "property1" will be distinct properties...
If this is a big issue for you, i'd suggest submitting it to microsoft connect as a bug, or entering a uservoice suggestion above. I'll pass this on as something that really needs to be documented in the group by thing in the azure docs, too.
How do I create an activity feed rule that writes an auto post on the Record Wall of a case when an email is automatically assigned (made Regarding) to that case because of its tracking token?
Our users are having trouble realising that there is something new to look at in the case and this would go a long way to preventing them from missing an important event.
EDIT:
These solutions have already been considered
They don't want follow up tasks.
The email is already displayed in a grid on the case
They don't want more Queues to check.
They don't want more emails to deal with.
This user is recalcitrant to say the least...they only want a note to appear on the record wall of the case.
To accomplish this with little/no coding, you could:
1) create a task or other activity that would show up on the activity feed. This is easily accomplished via workflow.
2) display the email/other activities in a grid on the case.
3) also set up queues to handle this.
4) send an email to the owner of the case when an activity gets appended to it.
There are a lot of options to resolve the issue of notifying users that their case has additional info.
EDIT:
Your comments are accurate and well received. Can't you do something as simple as create a workflow that will create a post when an email is created and/or when set regarding field changes. Then you can check within the workflow that the set regarding is for a case or else cancel the workflow. Within the post record, set the type to auto and the regarding to the same regarding as the email. (I was unable to get the record wall part working in my local VM, so I assumed that any post record regarding the case should show up in the case, but I couldn't test that).