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

Function getSocialTwitterPostType

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

Source from the content-addressed store, hash-verified

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