You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feed client can now be initialized with a `mode` option, set to either `"compact"` or `"rich"`. When `mode` is `"compact"`, the following restrictions will apply when the feed is fetched:
12
+
13
+
- The `activities` and `total_activities` fields will _not_ be present on feed items
14
+
- The `data` field will _not_ include nested arrays and objects
15
+
- The `actors` field will only have up to one actor
16
+
17
+
**By default, feeds are initialized in `"compact"` mode. If you need to access `activities`, `total_activities`, the complete `data`, or the complete array of `actors`, you must initialize your feed in `"rich"` mode.**
18
+
19
+
If you are using the feed client via `@knocklabs/client` directly:
20
+
21
+
```js
22
+
constknockFeed=knockClient.feeds.initialize(
23
+
process.env.KNOCK_FEED_CHANNEL_ID,
24
+
{ mode:"rich" },
25
+
);
26
+
```
27
+
28
+
If you are using `<KnockFeedProvider>` via `@knocklabs/react`, `@knocklabs/react-native`, or `@knocklabs/expo`:
29
+
30
+
```tsx
31
+
<KnockFeedProvider
32
+
feedId={process.env.KNOCK_FEED_CHANNEL_ID}
33
+
defaultFeedOptions={{ mode: "rich" }}
34
+
/>
35
+
```
36
+
37
+
If you are using the `useNotifications` hook via `@knocklabs/react-core`:
0 commit comments