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

Function isSocialTwitterShareLike

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

Source from the content-addressed store, hash-verified

70): boolean => post?.type === PostType.SocialTwitter;
71
72export const isSocialTwitterShareLike = (
73 post: Pick<Post, 'type' | 'subType' | 'sharedPost'> | undefined | null,
74): boolean => {
75 if (!post || !isSocialTwitterPost(post)) {
76 return false;
77 }
78
79 if (!post.sharedPost) {
80 return false;
81 }
82
83 return ['quote', 'repost'].includes(post.subType || '');
84};
85
86export const getSocialTwitterPostType = (
87 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