iOS/Swift

Targeting with TO Field

LAST EDIT May 05 2021

The TO field allows you to specify a list of feeds to which the activity should be copied. One way to think about it is as the CC functionality of email.

Use Case: Mentions

Copied!

Targeting is useful when you want to support @mentions and notify users. An example is shown below:

The TO field is limited to a maximum of 100 targets per API request.

Use Case: Organizations & Topics

Copied!

Another everyday use case is for teams, organizations or topics.

For example, one of our customers runs a football community. Updates about a player should also be added to their team's feed. Stream supports this by adding the activity to the player's feed, and specifying the target feeds in the TO field:

By default only the user, flat, aggregated and notification feed groups are set up automatically. You'll need to go to the dashboard and create feeds called team, player and match for the above example to work.