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

Function isSocialTwitterShareLike

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

Source from the content-addressed store, hash-verified

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