improvement: config to disable dm/invoice creation

While sending dms to users who are not signed up
but have attempted to publish events, it is now
disabled by default. This stops the creation of
extra invoices for pubkeys that may have no
intention of signing up for the relay. It also
reduced the number of dms that are created.

Signed-off-by: Greg Heartsfield <scsibug@imap.cc>
This commit is contained in:
thesimplekid 2023-11-13 08:24:59 +00:00 committed by Greg Heartsfield
parent 84f60f0abc
commit 4ff77ab537
3 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ reject_future_seconds = 1800
#api_secret = "<ln bits api>" #api_secret = "<ln bits api>"
# Nostr direct message on signup # Nostr direct message on signup
#direct_message=true #direct_message=false
# Terms of service # Terms of service
#terms_message = """ #terms_message = """

View File

@ -320,7 +320,7 @@ impl Default for Settings {
node_url: "".to_string(), node_url: "".to_string(),
api_secret: "".to_string(), api_secret: "".to_string(),
sign_ups: false, sign_ups: false,
direct_message: true, direct_message: false,
secret_key: None, secret_key: None,
processor: Processor::LNBits, processor: Processor::LNBits,
}, },

View File

@ -261,7 +261,7 @@ pub async fn db_writer(
) => { ) => {
// User does not exist // User does not exist
info!("Unregistered user"); info!("Unregistered user");
if settings.pay_to_relay.sign_ups { if settings.pay_to_relay.sign_ups && settings.pay_to_relay.direct_message {
payment_tx payment_tx
.send(PaymentMessage::NewAccount(event.pubkey)) .send(PaymentMessage::NewAccount(event.pubkey))
.ok(); .ok();