Pins

Overview

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

// Pin an activity
client.pinActivity({
  feed_group_id: feed.group,
  feed_id: feed.id,
  activity_id: "activity_123",
});

// Unpin an activity
client.unpinActivity({
  feed_group_id: feed.group,
  feed_id: feed.id,
  activity_id: "activity_123",
});

When you read a feed pinned activities are automatically returned:

const response = await feed.getOrCreate();
console.log(response.pinned_activities);
Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Feeds React v3: <Your Question>