GetStream / stream-js

JS / Browser Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
329 stars 110 forks source link

No user_id enrichment option for batch getActivities #608

Open lavirez opened 3 months ago

lavirez commented 3 months ago

Hey there I have used your SDK in the following code, I used user_id and it was just fine it filtered the ownReactions by the given user_id.

(async function () {
  try {
    const response = await client.getActivities({
      ids: ['<activity_id>'],
        user_id:
        '<user_id>',
      reactions: {

        recent: true,
        counts: true,
        own: true,
        kind: true,
      },
    });
  } catch (error) {
    console.log(error);
  }
})();

However in SDK source code the EnrichOptions is defined as following:

export type EnrichOptions = {
  enrich?: boolean;
  ownReactions?: boolean; // best not to use it, will be removed by client.replaceReactionOptions()
  reactionKindsFilter?: string[]; // TODO: add support for array sample: kind,kind,kind
  recentReactionsLimit?: number;
  withOwnChildren?: boolean;
  withOwnReactions?: boolean;
  withReactionCounts?: boolean;
  withRecentReactions?: boolean;
  withUserId?: string;
};

There's no user_id what's the deal with that?