-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Remove Referral Notifications #1211
Conversation
@huumn There are still a few files left that reference Not sure if these should remain for the integrity of the data that exists already? 🤔 |
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})` | ||
) |
There was a problem hiding this comment.
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.
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 | ||
} |
There was a problem hiding this comment.
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.
We mostly just want to remove the notifications and notification indicator for referrals. Everything else can stay. |
Fixes #1047
Description
This PR removes the logic for referral notification as it isn't required anymore. See #1047 for further details.