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

Function getSocialTwitterPostType

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

Source from the content-addressed store, hash-verified

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