mirror of
https://github.com/lnbits/lnbits.git
synced 2026-08-13 12:42:47 +02:00
feat: add emailConfigured to PublicSettings (#4047)
Some checks failed
codeql / analyze (push) Has been cancelled
Some checks failed
codeql / analyze (push) Has been cancelled
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
parent
06c553219a
commit
43900dd6da
2 changed files with 8 additions and 1 deletions
|
|
@ -496,6 +496,11 @@ class NotificationsSettings(LNbitsSettings):
|
|||
and self.lnbits_telegram_notifications_access_token is not None
|
||||
)
|
||||
|
||||
def is_email_notifications_configured(self) -> bool:
|
||||
return self.lnbits_email_notifications_enabled and bool(
|
||||
self.lnbits_email_notifications_email
|
||||
)
|
||||
|
||||
|
||||
class FakeWalletFundingSource(LNbitsSettings):
|
||||
fake_wallet_secret: str = Field(default="ToTheMoon1")
|
||||
|
|
@ -1295,6 +1300,7 @@ class PublicSettings(BaseModel):
|
|||
extensions_reviews_url: str = Field(alias="extensionsReviewsUrl")
|
||||
ext_builder: bool = Field(alias="extBuilder")
|
||||
nostr_configured: bool = Field(alias="nostrConfigured")
|
||||
email_configured: bool = Field(alias="emailConfigured")
|
||||
telegram_configured: bool = Field(alias="telegramConfigured")
|
||||
wallet_featured_button_label: str | None = Field(alias="walletFeaturedButtonLabel")
|
||||
wallet_featured_button_url: str | None = Field(alias="walletFeaturedButtonUrl")
|
||||
|
|
@ -1359,6 +1365,7 @@ class PublicSettings(BaseModel):
|
|||
extensionsReviewsUrl=settings.lnbits_extensions_reviews_url,
|
||||
extBuilder=settings.lnbits_extensions_builder_activate_non_admins,
|
||||
nostrConfigured=settings.is_nostr_notifications_configured(),
|
||||
emailConfigured=settings.is_email_notifications_configured(),
|
||||
telegramConfigured=settings.is_telegram_notifications_configured(),
|
||||
walletFeaturedButtonLabel=settings.lnbits_wallet_featured_button_label,
|
||||
walletFeaturedButtonUrl=settings.lnbits_wallet_featured_button_url,
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ from lnbits.core.services.payments import (
|
|||
check_payment_status,
|
||||
check_pending_payments,
|
||||
check_time_limit_between_transactions,
|
||||
check_wallet_daily_withdraw_limit,
|
||||
check_transaction_status,
|
||||
check_wallet_daily_withdraw_limit,
|
||||
check_wallet_limits,
|
||||
create_payment_request,
|
||||
get_payments_daily_stats,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue