Add dynamic relay dashboard URL support and version increment to v0.8.2.
- Introduced configuration option `RelayURL` for relay dashboard base URL.
- Added dynamic dashboard URL functionality in `PaymentProcessor`.
- Updated payment notifications to include dashboard access link.
- Incremented version to v0.8.2.
@ -33,6 +33,7 @@ type PaymentProcessor struct {
@@ -33,6 +33,7 @@ type PaymentProcessor struct {
ctxcontext.Context
cancelcontext.CancelFunc
wgsync.WaitGroup
dashboardURLstring
}
// NewPaymentProcessor creates a new payment processor
@ -301,8 +302,10 @@ Your paid subscription to this relay will expire in 7 days on %s.
@@ -301,8 +302,10 @@ Your paid subscription to this relay will expire in 7 days on %s.
// Create the note content with nostr:npub link and dashboard link
content:=fmt.Sprintf("Payment received: %d sats for %d days. Subscription expires: %s\n\nRelay: nostr:%s\n\nLog in to the relay dashboard to access your configuration at: %s",
@ -699,7 +704,9 @@ To extend your subscription after the trial ends, simply zap this note with the
@@ -699,7 +704,9 @@ To extend your subscription after the trial ends, simply zap this note with the
@ -750,6 +757,25 @@ Enjoy your time on the relay!`, monthlyPrice, monthlyPrice, string(relayNpubForC
@@ -750,6 +757,25 @@ Enjoy your time on the relay!`, monthlyPrice, monthlyPrice, string(relayNpubForC
returnnil
}
// SetDashboardURL sets the dynamic dashboard URL based on HTTP request