stop posting to the wrong nostr account
This commit is contained in:
parent
26a23ade92
commit
2136c1a11f
@ -37,6 +37,7 @@ TWITTER_POSTER_API_KEY=
|
||||
TWITTER_POSTER_API_KEY_SECRET=
|
||||
TWITTER_POSTER_ACCESS_TOKEN=
|
||||
TWITTER_POSTER_ACCESS_TOKEN_SECRET=
|
||||
NOSTR_POSTER_PRIVATE_KEY=
|
||||
|
||||
########################################
|
||||
# SNDEV STUFF WE PRESET #
|
||||
|
@ -38,13 +38,13 @@ const RELAYS = [
|
||||
]
|
||||
|
||||
async function postToNostr ({ message }) {
|
||||
if (!process.env.NOSTR_PRIVATE_KEY) {
|
||||
if (!process.env.NOSTR_POSTER_PRIVATE_KEY) {
|
||||
console.log('Nostr poster not configured')
|
||||
return
|
||||
}
|
||||
|
||||
const nostr = Nostr.get()
|
||||
const signer = nostr.getSigner({ privKey: process.env.NOSTR_PRIVATE_KEY })
|
||||
const signer = nostr.getSigner({ privKey: process.env.NOSTR_POSTER_PRIVATE_KEY })
|
||||
try {
|
||||
await nostr.publish({
|
||||
created_at: Math.floor(new Date().getTime() / 1000),
|
||||
|
Loading…
x
Reference in New Issue
Block a user