MCPcopy Create free account
hub / github.com/GetStream/stream-js / shouldUseEnrichEndpoint

Method shouldUseEnrichEndpoint

src/client.ts:587–615  ·  view source on GitHub ↗
(
    options: {
      enrich?: boolean;
      ownReactions?: boolean;
      reactionKindsFilter?: string[];
      withOwnChildren?: boolean;
      withReactionCounts?: boolean;
      withRecentReactions?: boolean;
      withScoreVars?: boolean;
      withUserId?: string;
    } = {},
  )

Source from the content-addressed store, hash-verified

585 };
586
587 shouldUseEnrichEndpoint(
588 options: {
589 enrich?: boolean;
590 ownReactions?: boolean;
591 reactionKindsFilter?: string[];
592 withOwnChildren?: boolean;
593 withReactionCounts?: boolean;
594 withRecentReactions?: boolean;
595 withScoreVars?: boolean;
596 withUserId?: string;
597 } = {},
598 ) {
599 if (options.enrich !== undefined) {
600 const result = options.enrich;
601 delete options.enrich;
602 return result;
603 }
604
605 return (
606 this.enrichByDefault ||
607 options.ownReactions != null ||
608 options.reactionKindsFilter != null ||
609 options.withRecentReactions != null ||
610 options.withScoreVars != null ||
611 options.withReactionCounts != null ||
612 options.withOwnChildren != null ||
613 options.withUserId != null
614 );
615 }
616
617 /**
618 * Adds the API key and the token

Callers 3

getActivitiesMethod · 0.95
test.tsFile · 0.80
getMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected