remove free comments (#2420)
* remove free comments * working on logic with bios and fees * Revert "working on logic with bios and fees" This reverts commit 0de31cbaaddd6733d8a2e8c099d0108d9f634512. --------- Co-authored-by: pory-gone <pory-gone@users.noreply.github.com>
This commit is contained in:
parent
6179ffb82b
commit
37a7f79625
@ -49,10 +49,12 @@ export async function getCost ({ subName, parentId, uploadIds, boost = 0, bio },
|
||||
FROM upload_fees(${me?.id || USER_ID.anon}::INTEGER, ${uploadIds}::INTEGER[]))
|
||||
+ ${satsToMsats(boost)}::INTEGER as cost`
|
||||
|
||||
// sub allows freebies (or is a bio or a comment), cost is less than baseCost, not anon,
|
||||
// cost must be greater than user's balance, and user has not disabled freebies
|
||||
const freebie = (parentId || bio) && cost <= baseCost && !!me &&
|
||||
me?.msats < cost && !me?.disableFreebies && me?.mcredits < cost
|
||||
// freebies currently only apply to bios (comments disabled). To keep togglable behavior,
|
||||
// respect user's disableFreebies preference for bios as well.
|
||||
// conditions: is a bio, cost <= baseCost, user logged in, insufficient balance & credits,
|
||||
// and user has not disabled freebies
|
||||
const freebie = bio && cost <= baseCost && !!me &&
|
||||
me?.msats < cost && me?.mcredits < cost && !me?.disableFreebies
|
||||
|
||||
return freebie ? BigInt(0) : BigInt(cost)
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { SubmitButton } from './form'
|
||||
|
||||
const FeeButtonContext = createContext()
|
||||
|
||||
export function postCommentBaseLineItems ({ baseCost = 1, comment = false, me }) {
|
||||
export function postCommentBaseLineItems ({ baseCost = 1, comment = false, bio = false, me }) {
|
||||
const anonCharge = me
|
||||
? {}
|
||||
: {
|
||||
@ -28,10 +28,10 @@ export function postCommentBaseLineItems ({ baseCost = 1, comment = false, me })
|
||||
return {
|
||||
baseCost: {
|
||||
term: baseCost,
|
||||
label: `${comment ? 'comment' : 'post'} cost`,
|
||||
label: `${bio ? 'bio' : (comment ? 'comment' : 'post')} cost`,
|
||||
op: '_',
|
||||
modifier: (cost) => cost + baseCost,
|
||||
allowFreebies: comment
|
||||
allowFreebies: bio
|
||||
},
|
||||
...anonCharge
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ sub: meta
|
||||
|
||||
_To quickly browse through this FAQ page, click the chapters icon in the top-right corner. This will let you scroll through all chapters or search for a particular topic within this page._
|
||||
|
||||
last updated: July 16, 2025
|
||||
last updated: August 13, 2025
|
||||
|
||||
---
|
||||
|
||||
@ -46,7 +46,7 @@ See the [section about territories](#territories) for details.
|
||||
|
||||
### Do I need bitcoin to use Stacker News?
|
||||
|
||||
No. Every new stacker can post or comment for free (with limited visibility) while they earn their first few CCs or sats. After a stacker has gained a balance, subsequent posts and comments will incur a small fee to prevent spam and to encourage quality contributions. Many stackers earn enough from their posts and comments to continue posting on the site indefinitely without ever buying CCs with sats.
|
||||
No. You don't need bitcoin to get started. You can create your bio for free (with limited visibility) and earn Cowboy Credits (CCs) from zaps to cover fees. Posts and comments incur a small fee to prevent spam and to encourage quality contributions. Many stackers earn enough from their posts and comments to continue posting on the site indefinitely without ever buying CCs with sats.
|
||||
|
||||
[Post and comment fees vary depending on the territory](#why-does-it-cost-more-to-post-in-some-territories).
|
||||
|
||||
|
@ -259,11 +259,11 @@ export default function Settings ({ ssrData }) {
|
||||
label={
|
||||
<div className='d-flex align-items-center'>disable freebies
|
||||
<Info>
|
||||
<p>Some comments can be created without paying. However, those comments have limited visibility.</p>
|
||||
<p>Some content can occasionally be created without paying, but such content has limited visibility.</p>
|
||||
|
||||
<p>If you disable freebies, you will always pay for your comments and get standard visibility.</p>
|
||||
<p>If you disable freebies, you will always pay standard fees and get standard visibility.</p>
|
||||
|
||||
<p>If you attach a sending wallet, we disable freebies for you unless you have checked/unchecked this value already.</p>
|
||||
<p>If you attach a sending wallet, we may disable freebies for you unless you have checked/unchecked this value already.</p>
|
||||
</Info>
|
||||
</div>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user