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

Function getSocialTwitterPostType

packages/shared/src/graphql/posts.ts:86–94  ·  view source on GitHub ↗
(
  post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,
)

Source from the content-addressed store, hash-verified

84};
85
86export const getSocialTwitterPostType = (
87 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,
88): PostType | undefined => {
89 if (!isSocialTwitterPost(post)) {
90 return post?.type;
91 }
92
93 return isSocialTwitterShareLike(post) ? PostType.Share : PostType.Freeform;
94};
95
96export const isShareLikePost = (
97 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,

Callers 2

SquadPostContentRawFunction · 0.90
posts.spec.tsFile · 0.90

Calls 2

isSocialTwitterPostFunction · 0.85
isSocialTwitterShareLikeFunction · 0.85

Tested by

no test coverage detected