feat: add emailConfigured to PublicSettings (#4047)
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
@@ -496,6 +496,11 @@ class NotificationsSettings(LNbitsSettings):
|
|||||||
and self.lnbits_telegram_notifications_access_token is not None
|
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):
|
class FakeWalletFundingSource(LNbitsSettings):
|
||||||
fake_wallet_secret: str = Field(default="ToTheMoon1")
|
fake_wallet_secret: str = Field(default="ToTheMoon1")
|
||||||
@@ -1295,6 +1300,7 @@ class PublicSettings(BaseModel):
|
|||||||
extensions_reviews_url: str = Field(alias="extensionsReviewsUrl")
|
extensions_reviews_url: str = Field(alias="extensionsReviewsUrl")
|
||||||
ext_builder: bool = Field(alias="extBuilder")
|
ext_builder: bool = Field(alias="extBuilder")
|
||||||
nostr_configured: bool = Field(alias="nostrConfigured")
|
nostr_configured: bool = Field(alias="nostrConfigured")
|
||||||
|
email_configured: bool = Field(alias="emailConfigured")
|
||||||
telegram_configured: bool = Field(alias="telegramConfigured")
|
telegram_configured: bool = Field(alias="telegramConfigured")
|
||||||
wallet_featured_button_label: str | None = Field(alias="walletFeaturedButtonLabel")
|
wallet_featured_button_label: str | None = Field(alias="walletFeaturedButtonLabel")
|
||||||
wallet_featured_button_url: str | None = Field(alias="walletFeaturedButtonUrl")
|
wallet_featured_button_url: str | None = Field(alias="walletFeaturedButtonUrl")
|
||||||
@@ -1359,6 +1365,7 @@ class PublicSettings(BaseModel):
|
|||||||
extensionsReviewsUrl=settings.lnbits_extensions_reviews_url,
|
extensionsReviewsUrl=settings.lnbits_extensions_reviews_url,
|
||||||
extBuilder=settings.lnbits_extensions_builder_activate_non_admins,
|
extBuilder=settings.lnbits_extensions_builder_activate_non_admins,
|
||||||
nostrConfigured=settings.is_nostr_notifications_configured(),
|
nostrConfigured=settings.is_nostr_notifications_configured(),
|
||||||
|
emailConfigured=settings.is_email_notifications_configured(),
|
||||||
telegramConfigured=settings.is_telegram_notifications_configured(),
|
telegramConfigured=settings.is_telegram_notifications_configured(),
|
||||||
walletFeaturedButtonLabel=settings.lnbits_wallet_featured_button_label,
|
walletFeaturedButtonLabel=settings.lnbits_wallet_featured_button_label,
|
||||||
walletFeaturedButtonUrl=settings.lnbits_wallet_featured_button_url,
|
walletFeaturedButtonUrl=settings.lnbits_wallet_featured_button_url,
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ from lnbits.core.services.payments import (
|
|||||||
check_payment_status,
|
check_payment_status,
|
||||||
check_pending_payments,
|
check_pending_payments,
|
||||||
check_time_limit_between_transactions,
|
check_time_limit_between_transactions,
|
||||||
check_wallet_daily_withdraw_limit,
|
|
||||||
check_transaction_status,
|
check_transaction_status,
|
||||||
|
check_wallet_daily_withdraw_limit,
|
||||||
check_wallet_limits,
|
check_wallet_limits,
|
||||||
create_payment_request,
|
create_payment_request,
|
||||||
get_payments_daily_stats,
|
get_payments_daily_stats,
|
||||||
|
|||||||
Reference in New Issue
Block a user