Karan Adhikari commited on
Commit
2ca6f44
Β·
unverified Β·
1 Parent(s): b0d3e32

Update settings_manager.py

Browse files
Files changed (1) hide show
  1. Backend/helper/settings_manager.py +12 -1
Backend/helper/settings_manager.py CHANGED
@@ -19,6 +19,8 @@ _DEFAULTS: Dict[str, Any] = {
19
  "subscription_group_id": 0,
20
  "subscription_url": "https://t.me/",
21
  "approver_ids": [],
 
 
22
  "http_proxy_url": "",
23
  "show_proxy_and_non_proxy_both": False,
24
  "multi_tokens": [],
@@ -125,6 +127,14 @@ class Settings:
125
  def subscription_url(self) -> str:
126
  return str(self._d.get("subscription_url") or "https://t.me/")
127
 
 
 
 
 
 
 
 
 
128
  # ── Integers ─────────────────────────────────────────────────────────────
129
  @property
130
  def subscription_group_id(self) -> int:
@@ -269,7 +279,8 @@ class SettingsManager:
269
  LOGGER.error(f"SettingsManager reinit subscription: {exc}")
270
  results["subscription"] = f"error: {exc}"
271
  else:
272
- sub_keys = {"subscription_group_id", "approver_ids", "subscription_url"}
 
273
  if any(old.get(k) != new.get(k) for k in sub_keys):
274
  results["subscription"] = "settings reloaded in-memory"
275
 
 
19
  "subscription_group_id": 0,
20
  "subscription_url": "https://t.me/",
21
  "approver_ids": [],
22
+ "payment_instructions": "",
23
+ "payment_qr_url": "",
24
  "http_proxy_url": "",
25
  "show_proxy_and_non_proxy_both": False,
26
  "multi_tokens": [],
 
127
  def subscription_url(self) -> str:
128
  return str(self._d.get("subscription_url") or "https://t.me/")
129
 
130
+ @property
131
+ def payment_instructions(self) -> str:
132
+ return str(self._d.get("payment_instructions") or "")
133
+
134
+ @property
135
+ def payment_qr_url(self) -> str:
136
+ return str(self._d.get("payment_qr_url") or "")
137
+
138
  # ── Integers ─────────────────────────────────────────────────────────────
139
  @property
140
  def subscription_group_id(self) -> int:
 
279
  LOGGER.error(f"SettingsManager reinit subscription: {exc}")
280
  results["subscription"] = f"error: {exc}"
281
  else:
282
+ sub_keys = {"subscription_group_id", "approver_ids", "subscription_url",
283
+ "payment_instructions", "payment_qr_url"}
284
  if any(old.get(k) != new.get(k) for k in sub_keys):
285
  results["subscription"] = "settings reloaded in-memory"
286