Skip to content

Commit 37a7f79

Browse files
authored
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 0de31cb. --------- Co-authored-by: pory-gone <pory-gone@users.noreply.github.com>
1 parent 6179ffb commit 37a7f79

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

api/paidAction/itemCreate.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ export async function getCost ({ subName, parentId, uploadIds, boost = 0, bio },
4949
FROM upload_fees(${me?.id || USER_ID.anon}::INTEGER, ${uploadIds}::INTEGER[]))
5050
+ ${satsToMsats(boost)}::INTEGER as cost`
5151

52-
// sub allows freebies (or is a bio or a comment), cost is less than baseCost, not anon,
53-
// cost must be greater than user's balance, and user has not disabled freebies
54-
const freebie = (parentId || bio) && cost <= baseCost && !!me &&
55-
me?.msats < cost && !me?.disableFreebies && me?.mcredits < cost
52+
// freebies currently only apply to bios (comments disabled). To keep togglable behavior,
53+
// respect user's disableFreebies preference for bios as well.
54+
// conditions: is a bio, cost <= baseCost, user logged in, insufficient balance & credits,
55+
// and user has not disabled freebies
56+
const freebie = bio && cost <= baseCost && !!me &&
57+
me?.msats < cost && me?.mcredits < cost && !me?.disableFreebies
5658

5759
return freebie ? BigInt(0) : BigInt(cost)
5860
}

components/fee-button.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { SubmitButton } from './form'
1414

1515
const FeeButtonContext = createContext()
1616

17-
export function postCommentBaseLineItems ({ baseCost = 1, comment = false, me }) {
17+
export function postCommentBaseLineItems ({ baseCost = 1, comment = false, bio = false, me }) {
1818
const anonCharge = me
1919
? {}
2020
: {
@@ -28,10 +28,10 @@ export function postCommentBaseLineItems ({ baseCost = 1, comment = false, me })
2828
return {
2929
baseCost: {
3030
term: baseCost,
31-
label: `${comment ? 'comment' : 'post'} cost`,
31+
label: `${bio ? 'bio' : (comment ? 'comment' : 'post')} cost`,
3232
op: '_',
3333
modifier: (cost) => cost + baseCost,
34-
allowFreebies: comment
34+
allowFreebies: bio
3535
},
3636
...anonCharge
3737
}

docs/user/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sub: meta
88

99
_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._
1010

11-
last updated: July 16, 2025
11+
last updated: August 13, 2025
1212

1313
---
1414

@@ -46,7 +46,7 @@ See the [section about territories](#territories) for details.
4646

4747
### Do I need bitcoin to use Stacker News?
4848

49-
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.
49+
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.
5050

5151
[Post and comment fees vary depending on the territory](#why-does-it-cost-more-to-post-in-some-territories).
5252

pages/settings/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ export default function Settings ({ ssrData }) {
259259
label={
260260
<div className='d-flex align-items-center'>disable freebies
261261
<Info>
262-
<p>Some comments can be created without paying. However, those comments have limited visibility.</p>
262+
<p>Some content can occasionally be created without paying, but such content has limited visibility.</p>
263263

264-
<p>If you disable freebies, you will always pay for your comments and get standard visibility.</p>
264+
<p>If you disable freebies, you will always pay standard fees and get standard visibility.</p>
265265

266-
<p>If you attach a sending wallet, we disable freebies for you unless you have checked/unchecked this value already.</p>
266+
<p>If you attach a sending wallet, we may disable freebies for you unless you have checked/unchecked this value already.</p>
267267
</Info>
268268
</div>
269269
}

0 commit comments

Comments
 (0)