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

Function getSocialTwitterPostType

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

Source from the content-addressed store, hash-verified

77};
78
79export const getSocialTwitterPostType = (
80 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,
81): PostType | undefined => {
82 if (!isSocialTwitterPost(post)) {
83 return post?.type;
84 }
85
86 return isSocialTwitterShareLike(post) ? PostType.Share : PostType.Freeform;
87};
88
89export const isShareLikePost = (
90 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