MCPcopy Create free account
hub / github.com/dailydotdev/apps / getFollowSide

Function getFollowSide

packages/shared/src/features/feedExplain/describe.ts:61–74  ·  view source on GitHub ↗
({ follow }: RankedExplain)

Source from the content-addressed store, hash-verified

59 * the source or author the reader set a level on.
60 */
61const getFollowSide = ({ follow }: RankedExplain): FollowSide | undefined => {
62 if (follow.kind) {
63 return follow.kind === ExplainFollowKind.Author
64 ? FollowSide.Author
65 : FollowSide.Source;
66 }
67 if (follow.source_control && follow.source_control !== FollowControl.Off) {
68 return FollowSide.Source;
69 }
70 if (follow.author_control && follow.author_control !== FollowControl.Off) {
71 return FollowSide.Author;
72 }
73 return undefined;
74};
75
76// Show more, or an exact weight above 1, brings a source's or author's posts
77// in the way a follow does.

Callers 3

getExplainSignalsFunction · 0.85
getSideFactorFunction · 0.85
getExplanationMatchesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected