Skip to content

Commit

Permalink
improvement: config to disable dm/invoice creation
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thesimplekid authored and scsibug committed Nov 23, 2023
1 parent 84f60f0 commit 4ff77ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ reject_future_seconds = 1800
#api_secret = "<ln bits api>"

# Nostr direct message on signup
#direct_message=true
#direct_message=false

# Terms of service
#terms_message = """
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl Default for Settings {
node_url: "".to_string(),
api_secret: "".to_string(),
sign_ups: false,
direct_message: true,
direct_message: false,
secret_key: None,
processor: Processor::LNBits,
},
Expand Down
2 changes: 1 addition & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ pub async fn db_writer(
) => {
// User does not exist
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
.send(PaymentMessage::NewAccount(event.pubkey))
.ok();
Expand Down

0 comments on commit 4ff77ab

Please sign in to comment.