updateActivityToTargets method

Future<void> updateActivityToTargets(
  1. ActivityUpdate update,
  2. Iterable<FeedId> add,
  3. Iterable<FeedId> remove
)
inherited

Updates an activity's Activity.to fields

Parameters:

  • update: the Activity to update
  • remove: Remove these targets from the activity
  • add : Add these new targets to the activity

For example:

final add = <FeedId>[];
final remove = <FeedId>[];
await userFeed.updateActivityToTargets(update, add, remove);

API docs: targeting

Implementation

Future<void> updateActivityToTargets(
    ActivityUpdate update, Iterable<FeedId> add, Iterable<FeedId> remove) {
  final token = userToken ??
      TokenHelper.buildToTargetUpdateToken(
          secret!, TokenAction.write, feedId);
  return feed.updateActivityToTargets(token, feedId, update,
      add: add, remove: remove);
}