diff --git a/src/helpers/sendHotPost.ts b/src/helpers/sendHotPost.ts index 7ead03b..316ba52 100644 --- a/src/helpers/sendHotPost.ts +++ b/src/helpers/sendHotPost.ts @@ -6,7 +6,7 @@ import isHotPost from '@/helpers/isHotPost' import sendFirebaseNotification from '@/helpers/sendFirebaseNotification' import structToCid from '@/helpers/structToCid' -async function isSendedHotPost(feedId: number, postId: number) { +async function didSendHotPostHotPost(feedId: number, postId: number) { const sendedDate = await getItem(`hot-post-${feedId}-${postId}`) return sendedDate !== undefined } @@ -15,7 +15,7 @@ export default async function checkAndSendHotPost( feedId: number, postId: number ) { - if (await isSendedHotPost(feedId, postId)) return + if (await didSendHotPostHotPost(feedId, postId)) return const isHot = await isHotPost(feedId, postId) if (!isHot) return diff --git a/src/helpers/sendPost.ts b/src/helpers/sendPost.ts index 787d110..453e7a9 100644 --- a/src/helpers/sendPost.ts +++ b/src/helpers/sendPost.ts @@ -7,7 +7,7 @@ import getIPFSContent from '@/helpers/getIPFSContent' import sendFirebaseNotification from '@/helpers/sendFirebaseNotification' import structToCid from '@/helpers/structToCid' -async function isSendedHotPost(feedId: number, postId: number) { +async function didSendHotPost(feedId: number, postId: number) { const sendedDate = await getItem(`post-${feedId}-${postId}`) return sendedDate !== undefined } @@ -17,7 +17,7 @@ export default async function sendPost( postId: number, [author, metadata]: PostStructOutput ) { - if (await isSendedHotPost(feedId, postId)) return + if (await didSendHotPost(feedId, postId)) return const feedName = feedsData[feedId] if (!feedName) {