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

Function getPostToShare

packages/shared/src/graphql/posts.ts:146–153  ·  view source on GitHub ↗
(
  post: T,
)

Source from the content-addressed store, hash-verified

144 * it shares the post it wraps, the same way the API resolves it.
145 */
146export const getPostToShare = <
147 T extends Pick<Post, 'type' | 'title' | 'sharedPost'>,
148>(
149 post: T,
150): T | SharedPost =>
151 post.type === PostType.Share && !post.title && post.sharedPost
152 ? post.sharedPost
153 : post;
154
155export const getPostTitle = (
156 post:

Callers 4

onShareToSquadFunction · 0.90
SocialShareFunction · 0.90
onShareToSquadFunction · 0.90
posts.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected