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

Function getPostToShare

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

Source from the content-addressed store, hash-verified

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