diff --git a/docs/FRONTEND_DEPLOYMENT_ZH.md b/docs/FRONTEND_DEPLOYMENT_ZH.md index 5cb819c4..8ec96d1c 100644 --- a/docs/FRONTEND_DEPLOYMENT_ZH.md +++ b/docs/FRONTEND_DEPLOYMENT_ZH.md @@ -93,7 +93,7 @@ POLYWEATHER_OPS_ADMIN_EMAILS=yhrsc30@gmail.com ```env NEXT_PUBLIC_TELEGRAM_GROUP_URL=https://t.me/ -NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/WeatherQuant_bot +NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/polyyuanbot ``` 只影响按钮跳转,不影响核心页面加载。 diff --git a/frontend/.env.example b/frontend/.env.example index 2e7926cc..e720d351 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -39,5 +39,5 @@ NEXT_PUBLIC_WALLETCONNECT_POLYGON_RPC_URL=https://polygon-bor-rpc.publicnode.com NEXT_PUBLIC_PAYMENT_ALLOWED_HOSTS=polyweather-pro.vercel.app POLYWEATHER_OPS_ADMIN_EMAILS=yhrsc30@gmail.com NEXT_PUBLIC_TELEGRAM_GROUP_URL=https://t.me/your_group -NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/WeatherQuant_bot -NEXT_PUBLIC_TELEGRAM_LOGIN_BOT_USERNAME=WeatherQuant_bot +NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/polyyuanbot +NEXT_PUBLIC_TELEGRAM_LOGIN_BOT_USERNAME=polyyuanbot diff --git a/frontend/.env.local b/frontend/.env.local index 2e7926cc..e720d351 100644 --- a/frontend/.env.local +++ b/frontend/.env.local @@ -39,5 +39,5 @@ NEXT_PUBLIC_WALLETCONNECT_POLYGON_RPC_URL=https://polygon-bor-rpc.publicnode.com NEXT_PUBLIC_PAYMENT_ALLOWED_HOSTS=polyweather-pro.vercel.app POLYWEATHER_OPS_ADMIN_EMAILS=yhrsc30@gmail.com NEXT_PUBLIC_TELEGRAM_GROUP_URL=https://t.me/your_group -NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/WeatherQuant_bot -NEXT_PUBLIC_TELEGRAM_LOGIN_BOT_USERNAME=WeatherQuant_bot +NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/polyyuanbot +NEXT_PUBLIC_TELEGRAM_LOGIN_BOT_USERNAME=polyyuanbot diff --git a/frontend/README.md b/frontend/README.md index 6ce29413..c2ea100a 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -95,7 +95,7 @@ POLYWEATHER_OPS_ADMIN_EMAILS=yhrsc30@gmail.com # 社群入口 NEXT_PUBLIC_TELEGRAM_GROUP_URL=https://t.me/ -NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/WeatherQuant_bot +NEXT_PUBLIC_TELEGRAM_BOT_URL=https://t.me/polyyuanbot # 推荐默认关闭的前端观测 / 预热开关 NEXT_PUBLIC_POLYWEATHER_APP_ANALYTICS=false diff --git a/frontend/app/subscription-help/SubscriptionHelpClient.tsx b/frontend/app/subscription-help/SubscriptionHelpClient.tsx index 01b5449e..a2c17d5c 100644 --- a/frontend/app/subscription-help/SubscriptionHelpClient.tsx +++ b/frontend/app/subscription-help/SubscriptionHelpClient.tsx @@ -14,7 +14,7 @@ import { useI18n } from "@/hooks/useI18n"; const TELEGRAM_GROUP_URL = String( process.env.NEXT_PUBLIC_TELEGRAM_GROUP_URL || - "https://t.me/+nMG7SjziUKYyZmM1", + "https://t.me/+Io5H9oVHFmVjOTQ5", ).trim(); const FAQ_ITEMS = [ diff --git a/frontend/components/account/account-copy.ts b/frontend/components/account/account-copy.ts index bfc24633..021f9a9e 100644 --- a/frontend/components/account/account-copy.ts +++ b/frontend/components/account/account-copy.ts @@ -42,14 +42,14 @@ export function createAccountCopy(isEn: boolean): Record { ? "Use one-click Telegram binding first to sync notifications and access. After binding, refresh this page and submit your Telegram group join request." : "优先使用「一键绑定 Telegram Bot」同步通知与权限。绑定完成后刷新本页,再提交 Telegram 群组入群申请。", telegramFallbackHint: isEn - ? "Fallback copy method: only use this if one-click binding does not open Telegram correctly. Copy the command below and send it to @WeatherQuant_bot. After binding, refresh this page to show the group entry." - : "兜底复制方式:仅在一键绑定无法正常打开 Telegram 时使用。请复制下方命令并发送给 @WeatherQuant_bot。绑定完成后刷新本页,即可显示入群入口。", + ? "Fallback copy method: only use this if one-click binding does not open Telegram correctly. Copy the command below and send it to @polyyuanbot. After binding, refresh this page to show the group entry." + : "兜底复制方式:仅在一键绑定无法正常打开 Telegram 时使用。请复制下方命令并发送给 @polyyuanbot。绑定完成后刷新本页,即可显示入群入口。", paymentManualSupport: isEn ? "If payment succeeds but Pro is still not activated, email yhrsc30@gmail.com. This project is currently maintained by one developer, so manual recovery may be needed in edge cases." : "如果付款成功后 Pro 仍未开通,请发邮件到 yhrsc30@gmail.com。当前项目由我一人维护,极少数边缘情况可能需要人工补开。给你带来的不便,敬请谅解!", telegramBotLink: isEn - ? "Open Bot (@WeatherQuant_bot)" - : "打开机器人 (@WeatherQuant_bot)", + ? "Open Bot (@polyyuanbot)" + : "打开机器人 (@polyyuanbot)", telegramBotBindLink: isEn ? "One-click Telegram Binding" : "一键绑定 Telegram Bot", telegramGroupLink: isEn ? "Join Telegram Group" : "加入 Telegram 群组", telegramTopicsGroupLink: isEn diff --git a/frontend/components/account/constants.ts b/frontend/components/account/constants.ts index 30f46ed6..06d1cca8 100644 --- a/frontend/components/account/constants.ts +++ b/frontend/components/account/constants.ts @@ -5,9 +5,9 @@ export const WALLETCONNECT_POLYGON_RPC_URL = String( process.env.NEXT_PUBLIC_WALLETCONNECT_POLYGON_RPC_URL || "https://polygon-bor-rpc.publicnode.com", ).trim(); -export const TELEGRAM_GROUP_URL = "https://t.me/+Se93RpNQ58FhYmZh"; +export const TELEGRAM_GROUP_URL = "https://t.me/+Io5H9oVHFmVjOTQ5"; export const TELEGRAM_BOT_URL = String( - process.env.NEXT_PUBLIC_TELEGRAM_BOT_URL || "https://t.me/WeatherQuant_bot", + process.env.NEXT_PUBLIC_TELEGRAM_BOT_URL || "https://t.me/polyyuanbot", ).trim(); export const TELEGRAM_TOPICS_GROUP_URL = TELEGRAM_GROUP_URL; export const SUBSCRIPTION_HELP_HREF = "/subscription-help"; diff --git a/frontend/components/dashboard/ProFeaturePaywall.tsx b/frontend/components/dashboard/ProFeaturePaywall.tsx index bea00779..fe2c6fe5 100644 --- a/frontend/components/dashboard/ProFeaturePaywall.tsx +++ b/frontend/components/dashboard/ProFeaturePaywall.tsx @@ -9,7 +9,7 @@ import { trackAppEvent } from "@/lib/app-analytics"; const TELEGRAM_GROUP_URL = String( process.env.NEXT_PUBLIC_TELEGRAM_GROUP_URL || - "https://t.me/+nMG7SjziUKYyZmM1", + "https://t.me/+Io5H9oVHFmVjOTQ5", ).trim(); const SUBSCRIPTION_HELP_HREF = "/subscription-help"; diff --git a/frontend/components/subscription/UnlockProOverlay.tsx b/frontend/components/subscription/UnlockProOverlay.tsx index 253af488..773350f3 100644 --- a/frontend/components/subscription/UnlockProOverlay.tsx +++ b/frontend/components/subscription/UnlockProOverlay.tsx @@ -22,7 +22,7 @@ import { import s from "./UnlockProOverlay.module.css"; const DEFAULT_FAQ_HREF = "/subscription-help"; -const DEFAULT_TELEGRAM_GROUP_URL = "https://t.me/+nMG7SjziUKYyZmM1"; +const DEFAULT_TELEGRAM_GROUP_URL = "https://t.me/+Io5H9oVHFmVjOTQ5"; export type UnlockProBilling = { pointsEnabled: boolean; diff --git a/grep.exe.stackdump b/grep.exe.stackdump new file mode 100644 index 00000000..58995648 --- /dev/null +++ b/grep.exe.stackdump @@ -0,0 +1,15 @@ +Stack trace: +Frame Function Args +000FFFFBCA0 00180062F57 (000FFFFBEA8, 00000000002, 00000000002, 000FFFFDE50) +00000000000 00180065045 (00000000064, 00000000000, 00000000188, 00000000000) +000FFFFC3B0 001801369F8 (00000000000, 00000000000, 00000000000, 00000000000) +000000000C1 0018013202B (00000000000, 00000000000, 00000000000, 000007E39A0) +000FFFFC7D0 00180132435 (00000000000, 00800000000, 000000000B5, 00100437000) +000FFFFC7D0 001802195E8 (00000000000, 00800000030, 00000000000, 00000000000) +000FFFFC7D0 00100429F25 (001800DB6FE, 0007FFE0358, 7FFEDD6B00F3, 000002432EE) +000FFFFC840 00100404B11 (0000000003F, 00000000040, 00000000040, 00000000000) +000FFFFCA30 001004294B0 (000FFFFCBD0, 00180235040, 00000000000, 04EC36FD370) +000FFFFCD30 00180049B91 (00000000000, 00000000000, 00000000000, 00000000000) +000FFFFFFF0 00180047716 (00000000000, 00000000000, 00000000000, 00000000000) +000FFFFFFF0 001800477C4 (00000000000, 00000000000, 00000000000, 00000000000) +End of stack trace diff --git a/scripts/create_forum_topics.py b/scripts/create_forum_topics.py index b9ce0329..b10c74d8 100644 --- a/scripts/create_forum_topics.py +++ b/scripts/create_forum_topics.py @@ -38,7 +38,7 @@ def _load_env() -> None: _load_env() BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "").strip() -CHAT_ID = -1003965137823 +CHAT_ID = -1003927451869 CITIES: list[tuple[str, str]] = [ ("🇨🇳 Beijing", "beijing"), diff --git a/scripts/delete_forum_topic.py b/scripts/delete_forum_topic.py index 7d12ed30..85acc3b7 100644 --- a/scripts/delete_forum_topic.py +++ b/scripts/delete_forum_topic.py @@ -25,7 +25,7 @@ def _load_env() -> None: _load_env() TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "").strip() -CHAT_ID = -1003965137823 +CHAT_ID = -1003927451869 if __name__ == "__main__": if len(sys.argv) < 2: diff --git a/scripts/scan_forum_topics.py b/scripts/scan_forum_topics.py index 6fdea3f0..9a457acd 100644 --- a/scripts/scan_forum_topics.py +++ b/scripts/scan_forum_topics.py @@ -27,7 +27,7 @@ def _load_env() -> None: _load_env() TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "").strip() -CHAT_ID = -1003965137823 +CHAT_ID = -1003927451869 def _try_get_topic(tid: int) -> dict | None: diff --git a/src/bot/io_layer.py b/src/bot/io_layer.py index 1f24a55a..3e8ea606 100644 --- a/src/bot/io_layer.py +++ b/src/bot/io_layer.py @@ -203,8 +203,8 @@ class BotIOLayer: "/diag - 查看 Bot 启动诊断\n\n" "/bind - 绑定 Supabase 账号(可选)\n" "/unbind - 解除当前 Telegram 与网页账号绑定\n\n" - "🔗 机器人: @WeatherQuant_bot\n" - "👥 社群: 加入 Telegram 群组\n\n" + "🔗 机器人: @polyyuanbot\n" + "👥 社群: 加入 Telegram 群组\n\n" "📌 私有频道用于接收自动推送;手动查看市场概览请私聊机器人发送 /markets\n\n" "🔐 /city 与 /deb 仅限官方群成员使用。\n\n" "示例: /city 伦敦/pwcity 伦敦\n" diff --git a/src/utils/daily_weather_report.py b/src/utils/daily_weather_report.py index 9869c10d..23f63838 100644 --- a/src/utils/daily_weather_report.py +++ b/src/utils/daily_weather_report.py @@ -33,7 +33,7 @@ TARGET_CITIES: List[str] = [ "qingdao", ] -FORUM_CHAT_ID = "-1003965137823" +FORUM_CHAT_ID = "-1003927451869" CITY_NAME_ZH: Dict[str, str] = { "beijing": "北京", diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index 42a823a8..85e24691 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -25,7 +25,7 @@ _CITY_THREAD_IDS_PATH = os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "data", "city_thread_ids.json", ) -_FORUM_CHAT_ID = "-1003965137823" +_FORUM_CHAT_ID = "-1003927451869" _city_thread_ids: dict = {} @@ -917,12 +917,12 @@ def _build_airport_status_message( time_suffix = f" · {local_time}" if local_time else "" amos = city_weather.get("amos") or {} - runway_data = (amos.get("runway_obs") or {}) if amos else {} + runway_data = amos.get("runway_obs") or {} runway_pairs = runway_data.get("runway_pairs") or [] runway_temps = runway_data.get("temperatures") or [] point_temps = runway_data.get("point_temperatures") or [] is_amsc = amos.get("source") in ("amsc_awos", "amos") - has_runway = bool(is_amsc and (point_temps or runway_temps)) + has_runway = bool(runway_pairs and (runway_temps or point_temps)) amos_icao = amos.get("icao") or HIGH_FREQ_AIRPORT_ICAO.get(city, "") settlement_pair = _settlement_runway_for_city(city) @@ -1213,11 +1213,20 @@ def _process_airport_city( airport_row = row break if not airport_row: - logger.warning( - "airport push skipped city={}: station {} not found in mgm_nearby ({} rows)", - city, airport_icao, len(mgm_nearby), - ) - return None + airport_primary = city_weather.get("airport_primary") or {} + if airport_primary.get("temp") is not None: + airport_row = airport_primary + else: + current_fallback = city_weather.get("current") or {} + if current_fallback.get("temp") is not None: + airport_row = current_fallback + else: + logger.warning( + "airport push skipped city={}: station {} not found in mgm_nearby, " + "airport_primary, or current (mgm={} rows)", + city, airport_icao, len(mgm_nearby), + ) + return None station_temp = airport_row.get("temp") if airport_row else None current_obs_time = str(airport_row.get("obs_time") or "") diff --git a/web/services/auth_api.py b/web/services/auth_api.py index 3196fc51..b73bc20a 100644 --- a/web/services/auth_api.py +++ b/web/services/auth_api.py @@ -214,7 +214,7 @@ def create_telegram_bot_bind_link(request: Request) -> Dict[str, Any]: bot_username = str( legacy_routes.os.getenv("TELEGRAM_BOT_USERNAME") or legacy_routes.os.getenv("NEXT_PUBLIC_TELEGRAM_BOT_USERNAME") - or "WeatherQuant_bot" + or "polyyuanbot" ).strip().lstrip("@") bot_url = f"https://t.me/{bot_username}?start={start_param}" return {