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

Function isSocialTwitterShareLike

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

Source from the content-addressed store, hash-verified

63): boolean => post?.type === PostType.SocialTwitter;
64
65export const isSocialTwitterShareLike = (
66 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,
67): boolean => {
68 if (!post || !isSocialTwitterPost(post)) {
69 return false;
70 }
71
72 if (!post.sharedPost) {
73 return false;
74 }
75
76 return ['quote', 'repost'].includes(post.subType || '');
77};
78
79export const getSocialTwitterPostType = (
80 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,

Callers 3

posts.spec.tsFile · 0.90
getSocialTwitterPostTypeFunction · 0.85
isShareLikePostFunction · 0.85

Calls 1

isSocialTwitterPostFunction · 0.85

Tested by

no test coverage detected