Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Pins

Overview

Sometimes you’ll want to pin your favorite activity to a feed. You can pin an activity like this:

_, err = client.Feeds().PinActivity(context.Background(), feedGroupID, feedID, activityID, &getstream.PinActivityRequest{
  UserID: getstream.PtrTo("john"),
})

if err != nil {
  log.Fatal("Error pinning activity:", err)
}

When you read a feed pinned activities are automatically returned:

_, err = client.Feeds().UnpinActivity(context.Background(), feedGroupID, feedID, activityID, &getstream.UnpinActivityRequest{
  UserID: getstream.PtrTo("john"),
})
if err != nil {
  log.Fatal("Error unpinning activity:", err)
}
© Getstream.io, Inc. All Rights Reserved.