Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
MixailE committed Oct 12, 2023
1 parent 4761a14 commit b4364b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/helpers/sendHotPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/sendPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) {
Expand Down

0 comments on commit b4364b6

Please sign in to comment.