Skip to content

Commit

Permalink
Fix crosspost default value for link, poll, bounty forms
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Feb 19, 2024
1 parent ae49a42 commit 116edb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/bounty-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function BountyForm ({
initial={{
title: item?.title || '',
text: item?.text || '',
crosspost: me?.nostrCrossposting,
crosspost: item ? !!item.noteId : me?.privates?.nostrCrossposting,
bounty: item?.bounty || 1000,
...AdvPostInitial({ forward: normalizeForwards(item?.forwards), boost: item?.boost }),
...SubSelectInitial({ sub: item?.subName || sub?.name })
Expand Down
2 changes: 1 addition & 1 deletion components/link-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function LinkForm ({ item, sub, editThreshold, children }) {
title: item?.title || shareTitle || '',
url: item?.url || shareUrl || '',
text: item?.text || '',
crosspost: me?.nostrCrossposting,
crosspost: item ? !!item.noteId : me?.privates?.nostrCrossposting,
...AdvPostInitial({ forward: normalizeForwards(item?.forwards), boost: item?.boost }),
...SubSelectInitial({ sub: item?.subName || sub?.name })
}}
Expand Down
2 changes: 1 addition & 1 deletion components/poll-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function PollForm ({ item, sub, editThreshold, children }) {
title: item?.title || '',
text: item?.text || '',
options: initialOptions || ['', ''],
crosspost: me?.nostrCrossposting,
crosspost: item ? !!item.noteId : me?.privates?.nostrCrossposting,
...AdvPostInitial({ forward: normalizeForwards(item?.forwards), boost: item?.boost }),
...SubSelectInitial({ sub: item?.subName || sub?.name })
}}
Expand Down

0 comments on commit 116edb4

Please sign in to comment.