Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Referral Notifications #1211

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tsmith123
Copy link
Contributor

Fixes #1047

Description

This PR removes the logic for referral notification as it isn't required anymore. See #1047 for further details.

@tsmith123
Copy link
Contributor Author

@huumn There are still a few files left that reference noteInvites: seed.sql, schema.prisma and migration.sql...

Not sure if these should remain for the integrity of the data that exists already? 🤔

Comment on lines -256 to -265
queries.push(
`(SELECT "Invite".id, MAX(users.created_at) AS "sortTime", NULL as "earnedSats",
'Invitification' AS type
FROM users JOIN "Invite" on users."inviteId" = "Invite".id
WHERE "Invite"."userId" = $1
AND users.created_at < $2
GROUP BY "Invite".id
ORDER BY "sortTime" DESC
LIMIT ${LIMIT})`
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to keep these ones. It's just the referrals we are axing.

Comment on lines -454 to -463
const [newInvites] = await models.$queryRawUnsafe(`
SELECT EXISTS(
SELECT *
FROM users JOIN "Invite" on users."inviteId" = "Invite".id
WHERE "Invite"."userId" = $1
AND users.created_at > $2)`, me.id, lastChecked)
if (newInvites.exists) {
foundNotes()
return true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, we want to keep the invites.

@huumn
Copy link
Member

huumn commented Jun 23, 2024

We mostly just want to remove the notifications and notification indicator for referrals. Everything else can stay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove referral notifications
2 participants