From 83f87e5ef32048268cd4c7268931b2c42ecf1d17 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 5 Nov 2026 20:52:37 +0800 Subject: [PATCH] Ship room-archive identity + join gates, and fix ntfy Beijing time for second timestamps. Room archives resolve guest nick/email for admin lists; social join/date/people/coffee use clearer access gates; ntfy no longer shows 1970 when track.ts sends Unix seconds. Co-authored-by: Cursor --- apps/api/services/ebook_svc/services/ntfy.py | 8 +- apps/api/services/social_svc/pb_data.py | 370 +++++++++++++++++- apps/api/services/social_svc/routers/api.py | 20 +- apps/api/services/social_svc/store.py | 19 + apps/com/admin/src/pages/MediaValue.tsx | 14 +- apps/com/admin/src/pages/Social.tsx | 22 +- src/lib/ntfy-rich.ts | 7 +- .../coffee/components/CoffeeBookPage.tsx | 23 +- src/modules/social/app/depth.css | 5 +- src/modules/social/app/experience.css | 4 +- src/modules/social/app/h5.css | 24 +- src/modules/social/app/interaction.css | 139 +++++-- src/modules/social/app/vivid.css | 19 +- src/modules/social/components/DateClient.tsx | 299 +++++++++----- .../social/components/JoinPayModal.tsx | 27 +- .../social/components/PeopleClient.tsx | 44 ++- .../social/components/PeopleProfileClient.tsx | 90 ++++- src/modules/social/components/SiteShell.tsx | 15 +- src/modules/social/lib/api.ts | 4 + src/modules/social/lib/joinFlow.ts | 107 +++++ src/modules/social/lib/joinModal.ts | 2 + src/modules/social/lib/phrases.ts | 38 ++ src/modules/social/lib/socialTrial.ts | 2 +- src/modules/vip/app/api/track/route.ts | 3 +- 24 files changed, 1116 insertions(+), 189 deletions(-) diff --git a/apps/api/services/ebook_svc/services/ntfy.py b/apps/api/services/ebook_svc/services/ntfy.py index 79b792a..432a0b1 100644 --- a/apps/api/services/ebook_svc/services/ntfy.py +++ b/apps/api/services/ebook_svc/services/ntfy.py @@ -17,12 +17,16 @@ _BEIJING = ZoneInfo("Asia/Shanghai") def format_beijing_time(ts: float | int | None = None) -> str: - """Admin / ntfy 统一北京时间。""" + """Admin / ntfy 统一北京时间。ts 兼容 Unix 秒或毫秒。""" try: if ts is None: d = datetime.now(_BEIJING) else: - d = datetime.fromtimestamp(float(ts), tz=_BEIJING) + n = float(ts) + # JS Date.now() 毫秒 ≈ 1e12+;track 常用秒 ≈ 1e9 + if n >= 1e12: + n = n / 1000.0 + d = datetime.fromtimestamp(n, tz=_BEIJING) return d.strftime("%Y-%m-%d %H:%M:%S") except Exception: return datetime.now(_BEIJING).strftime("%Y-%m-%d %H:%M:%S") diff --git a/apps/api/services/social_svc/pb_data.py b/apps/api/services/social_svc/pb_data.py index 5901d58..1a45ce1 100644 --- a/apps/api/services/social_svc/pb_data.py +++ b/apps/api/services/social_svc/pb_data.py @@ -2273,6 +2273,11 @@ def admin_list_trips(*, q: str = "", limit: int = 100, offset: int = 0) -> dict[ def _file_public_url(r: dict[str, Any]) -> str: path = str(r.get("path") or "") file_id = str(r.get("file_id") or r.get("id") or "") + # 身份烙在 #fragment,播放地址要剥掉 + if "#" in path and ( + path.startswith("http://") or path.startswith("https://") or path.startswith("/api/") + ): + path = path.split("#", 1)[0] if path.startswith("http://") or path.startswith("https://"): return path if path.startswith("/api/"): @@ -2301,6 +2306,8 @@ def _room_archive_status_from_row(r: dict[str, Any]) -> str: for st in ("pending", "recording", "uploading", "failed", "denied"): if low.startswith(f"{st}://"): return st + if low.startswith("uploaded://"): + return "uploaded" if path.startswith("http://") or path.startswith("https://") or path.startswith("/api/"): return "uploaded" if path.startswith("/var/") or path.startswith("/www/"): @@ -2319,8 +2326,15 @@ def _room_archive_meta_path( path: str = "", duration_sec: int = 0, started_at: str = "", + nick: str = "", + email: str = "", ) -> str: + from urllib.parse import quote + st = (status or "pending").strip().lower() + nick_n = (nick or "").strip()[:64] + email_n = (email or "").strip().lower()[:120] + # 已上传 S3 URL:把身份烙进 fragment,列表仍可解析(不影响播放) if st == "uploaded" and path and ( path.startswith("http://") or path.startswith("https://") @@ -2328,10 +2342,22 @@ def _room_archive_meta_path( or path.startswith("/var/") or path.startswith("/www/") ): - return path + base = path.split("#", 1)[0] + frag = [] + if nick_n: + frag.append(f"nick={quote(nick_n, safe='')}") + if email_n: + frag.append(f"email={quote(email_n, safe='')}") + if room_id: + frag.append(f"room={quote(str(room_id)[:80], safe='')}") + return f"{base}#{'&'.join(frag)}" if frag else base q = [] if room_id: q.append(f"room={room_id[:80]}") + if nick_n: + q.append(f"nick={quote(nick_n, safe='')}") + if email_n: + q.append(f"email={quote(email_n, safe='')}") if error: q.append(f"err={error[:120]}") if duration_sec and int(duration_sec) > 0: @@ -2342,6 +2368,88 @@ def _room_archive_meta_path( return f"{st}://room-archive/{session_id}{tail}" +def _parse_meta_fragment(path: str) -> dict[str, str]: + if "#" not in path: + return {} + try: + from urllib.parse import parse_qs, unquote + + frag = path.split("#", 1)[1] + return {k: unquote(v[0] if v else "") for k, v in parse_qs(frag).items()} + except Exception: + return {} + + +def _guest_identity_index() -> dict[str, dict[str, str]]: + """guest_id → {nick,email,name,label} from roster + join_leads + 最近聊天花名。""" + out: dict[str, dict[str, str]] = {} + + def _put(gid: str, *, nick: str = "", email: str = "") -> None: + gid = (gid or "").strip() + if not gid: + return + prev = out.get(gid) or {} + n = (nick or str(prev.get("nick") or "")).strip() + em = (email or str(prev.get("email") or "")).strip().lower() + if n in {"游民", "游客", "guest", "Guest", "匿名", "用户"}: + n = str(prev.get("nick") or "") + out[gid] = { + "nick": n, + "name": n, + "email": em, + "label": n or (em.split("@")[0] if em else "") or gid[:16], + } + + try: + for r in get_pb().list_all(C_ROSTER, sort="-updated_at", hard_limit=5000): + _put( + str(r.get("guest_id") or ""), + nick=str(r.get("name") or ""), + email=str(r.get("email") or ""), + ) + except Exception: + pass + try: + for r in get_pb().list_all(C_JOIN_LEADS, sort="-updated_at", hard_limit=5000): + _put( + str(r.get("guest_id") or ""), + nick=str(r.get("name") or ""), + email=str(r.get("email") or ""), + ) + except Exception: + pass + # 聊天 nick 兜底(test15 / test14 常只在消息 author 里) + try: + for r in get_pb().list_all(C_MESSAGES, sort="-created_at", hard_limit=2000): + gid = str(r.get("guest_id") or "").strip() + if not gid: + continue + if str((out.get(gid) or {}).get("nick") or "").strip(): + continue + _put(gid, nick=str(r.get("nick") or "")) + except Exception: + pass + return out + + +def _identity_from_archive_row( + r: dict[str, Any], id_index: dict[str, dict[str, str]] | None = None +) -> dict[str, str]: + gid = str(r.get("guest_id") or "").strip() + path = str(r.get("path") or "") + qs = _parse_meta_qs(path) + frag = _parse_meta_fragment(path) + nick = (frag.get("nick") or qs.get("nick") or "").strip() + email = (frag.get("email") or qs.get("email") or "").strip().lower() + hit = (id_index or {}).get(gid) or {} + if not nick: + nick = str(hit.get("nick") or hit.get("name") or "").strip() + if not email: + email = str(hit.get("email") or "").strip().lower() + label = nick or (email.split("@")[0] if email else "") or (gid[:16] if gid else "—") + return {"nick": nick, "email": email, "label": label, "guestId": gid} + + def _parse_meta_qs(path: str) -> dict[str, str]: if "://" not in path or "?" not in path: # uploaded S3 URL may embed nothing; try name later @@ -2410,8 +2518,15 @@ def _room_id_from_row(r: dict[str, Any]) -> str: return qs["room"][:120] name = str(r.get("name") or "") if name.startswith("room-") and ".webm" in name: - core = name[5:].split(".webm")[0] - core = core.split("__")[0] + core = name[5:].split(".webm")[0].split("__")[0] + if core.endswith("-pending"): + return core[: -len("-pending")][:120] + if core.endswith("-leave"): + return core[: -len("-leave")][:120] + # room--- + parts = core.rsplit("-", 2) + if len(parts) >= 3 and parts[-1].isdigit() and parts[-2].isdigit(): + return "-".join(parts[:-2])[:120] return core[:120] return "" @@ -2431,6 +2546,114 @@ def _is_room_archive_row(r: dict[str, Any]) -> bool: return False +def find_open_room_archive_session( + *, + guest_id: str, + channel_id: str = "", + filename: str = "", +) -> str: + """上传丢 session_id 时:挂到同 guest 最近一条未完成的 room-archive。""" + init_pb() + gid = (guest_id or "").strip() + if not gid: + return "" + ch = (channel_id or "").strip() + # filename 仅作弱提示:room--... + room_hint = "" + name = (filename or "").strip() + if name.startswith("room-"): + core = name[5:].split(".webm")[0].split("__")[0] + # 去掉末尾时间戳/序号:...-1730123456789-0 + parts = core.rsplit("-", 2) + if len(parts) >= 3 and parts[-1].isdigit() and parts[-2].isdigit(): + room_hint = "-".join(parts[:-2])[:120] + elif core.endswith("-pending"): + room_hint = core[: -len("-pending")][:120] + else: + room_hint = core[:120] + rows = get_pb().list_all(C_FILES, sort="-created_at", hard_limit=800) + open_sts = {"pending", "recording", "uploading"} + fallback = "" + for r in rows: + if not _is_room_archive_row(r): + continue + if str(r.get("guest_id") or "") != gid: + continue + st = _room_archive_status_from_row(r) + if st not in open_sts: + continue + rch = str(r.get("channel_id") or "") + if ch and rch and rch != ch: + continue + fid = str(r.get("file_id") or r.get("id") or "").strip() + if not fid: + continue + rid = _room_id_from_row(r) + if room_hint and rid and (room_hint in rid or rid in room_hint or room_hint == rid): + return fid[:80] + if not fallback: + fallback = fid[:80] + return fallback + + +def _supersede_sibling_open_archives( + *, + keep_session_id: str, + guest_id: str, + channel_id: str, + room_id: str = "", +) -> None: + """同 guest+厅 已有 uploaded 时,把其它卡死的 pending/recording 标 failed。""" + gid = (guest_id or "").strip() + keep = (keep_session_id or "").strip() + if not gid or not keep: + return + ch = (channel_id or "").strip() + room = (room_id or "").strip() + try: + rows = get_pb().list_all(C_FILES, sort="-created_at", hard_limit=800) + except Exception: + return + now = _now() + for r in rows: + if not _is_room_archive_row(r): + continue + fid = str(r.get("file_id") or "").strip() + if not fid or fid == keep: + continue + if str(r.get("guest_id") or "") != gid: + continue + if ch and str(r.get("channel_id") or "") not in {ch, "", "meetup-live"}: + if str(r.get("channel_id") or "") and str(r.get("channel_id") or "") != ch: + continue + rid = _room_id_from_row(r) + if room and rid and room not in rid and rid not in room: + continue + st = _room_archive_status_from_row(r) + if st not in {"pending", "recording"}: + continue + # 空壳未完成 → 被同场 uploaded 取代 + try: + get_pb().upsert( + C_FILES, + filter=f"file_id={pb_quote(fid)}", + payload={ + "path": _room_archive_meta_path( + "failed", + fid, + room_id=rid or room, + error="superseded by uploaded sibling", + duration_sec=_duration_from_row(r), + started_at=_parse_meta_qs(str(r.get("path") or "")).get("t0") or "", + ), + "kind": "room-archive", + "updated_at": now, + }, + ) + except Exception: + pass + + def upsert_room_archive_event( *, session_id: str, @@ -2446,6 +2669,8 @@ def upsert_room_archive_event( seq: int = 0, duration_sec: int = 0, started_at: str = "", + nick: str = "", + email: str = "", ) -> dict[str, Any]: """进厅埋点 → 后台立刻可见;状态:pending/recording/uploading/uploaded/failed/denied。""" init_pb() @@ -2459,13 +2684,32 @@ def upsert_room_archive_event( room = (room_id or "")[:120] dur = max(0, int(duration_sec or 0)) t0 = (started_at or "").strip()[:40] + nick_n = (nick or "").strip()[:64] + email_n = (email or "").strip().lower()[:120] + # 无显式身份时从花名册/报名补全,后台列表才能显示 test15 而非 guest_xxx + if gid and (not nick_n or not email_n): + try: + ident = _identity_from_archive_row({"guest_id": gid, "path": ""}, _guest_identity_index()) + if not nick_n: + nick_n = str(ident.get("nick") or "")[:64] + if not email_n: + email_n = str(ident.get("email") or "")[:120] + except Exception: + pass fname = (name or "").strip()[:160] or f"room-{room or ch}-{sid}.webm" if dur > 0 and "__" not in fname and fname.endswith(".webm"): fname = fname[:-5] + f"__{dur}s.webm" existing = get_pb().first(C_FILES, filter=f"file_id={pb_quote(sid)}") prev_qs = _parse_meta_qs(str((existing or {}).get("path") or "")) + prev_frag = _parse_meta_fragment(str((existing or {}).get("path") or "")) if not t0: t0 = prev_qs.get("t0") or "" + if not room: + room = (prev_qs.get("room") or prev_frag.get("room") or "")[:120] + if not nick_n: + nick_n = (prev_frag.get("nick") or prev_qs.get("nick") or "")[:64] + if not email_n: + email_n = (prev_frag.get("email") or prev_qs.get("email") or "")[:120] if not dur: try: dur = max(0, int(prev_qs.get("dur") or 0)) @@ -2481,12 +2725,16 @@ def upsert_room_archive_event( path=path, duration_sec=dur, started_at=t0, + nick=nick_n, + email=email_n, ) snap = { "sessionId": sid, "channelId": ch, "guestId": gid, "roomId": room, + "nick": nick_n, + "email": email_n, "status": st, "name": fname, "size": int(size or 0), @@ -2526,17 +2774,38 @@ def upsert_room_archive_event( prev_st = _room_archive_status_from_row(existing or {}) prev_path = str((existing or {}).get("path") or "") if prev_st == "uploaded" and st != "uploaded": - body["path"] = prev_path + keep = _room_archive_meta_path( + "uploaded", + sid, + room_id=room, + path=prev_path.split("#", 1)[0], + nick=nick_n, + email=email_n, + duration_sec=dur, + started_at=t0, + ) + body["path"] = keep body["name"] = str((existing or {}).get("name") or body["name"]) st = "uploaded" - final_path = prev_path + final_path = keep if st == "uploaded" and not ( final_path.startswith("http") or final_path.startswith("/api/") or final_path.startswith("/var") or final_path.startswith("/www") ): - body["path"] = prev_path or final_path + keep_src = (prev_path or final_path).split("#", 1)[0] + body["path"] = _room_archive_meta_path( + "uploaded", + sid, + room_id=room, + path=keep_src, + nick=nick_n, + email=email_n, + duration_sec=dur, + started_at=t0, + ) + final_path = body["path"] # 已上传真文件时把时长烙进文件名,方便列表展示 if st == "uploaded" and dur > 0: nm = str(body.get("name") or "") @@ -2544,17 +2813,31 @@ def upsert_room_archive_event( body["name"] = nm[:-5] + f"__{dur}s.webm" get_pb().upsert(C_FILES, filter=f"file_id={pb_quote(sid)}", payload=body) + if st == "uploaded": + try: + _supersede_sibling_open_archives( + keep_session_id=sid, + guest_id=body.get("guest_id") or gid, + channel_id=ch, + room_id=room or _room_id_from_row({**body, "path": final_path}), + ) + except Exception: + pass play = "" if st == "uploaded": play = _file_public_url({**body, "file_id": sid}) if "://" in play and not play.startswith("http") and not play.startswith("/api/"): play = "" + label = nick_n or (email_n.split("@")[0] if email_n else "") or (gid[:16] if gid else "") return { "ok": True, "sessionId": sid, "status": st, "channelId": ch, "guestId": gid, + "guestNick": nick_n, + "guestEmail": email_n, + "guestLabel": label, "roomId": room, "name": body.get("name") or fname, "size": body["size"], @@ -2608,6 +2891,10 @@ def admin_list_room_archives( gone = _soft_deleted_ids("files") | _soft_deleted_ids("room_archives") needle = (q or "").strip().lower() items = [] + from datetime import datetime, timezone + + now_utc = datetime.now(timezone.utc) + id_index = _guest_identity_index() for r in rows: fid = str(r.get("file_id") or r.get("id") or "") rid = str(r.get("id") or "") @@ -2621,20 +2908,21 @@ def admin_list_room_archives( continue st = _room_archive_status_from_row(r) dur = _duration_from_row(r) + age = 0.0 + try: + raw = str(r.get("created_at") or "").replace("Z", "+00:00") + start = datetime.fromisoformat(raw) + if start.tzinfo is None: + start = start.replace(tzinfo=timezone.utc) + age = (now_utc - start).total_seconds() + except Exception: + age = 0.0 # 空壳「上传中」超过 2 分钟视为失败(离厅未真正传完) - if st == "uploading" and int(r.get("size") or 0) <= 0: - try: - from datetime import datetime, timezone - - raw = str(r.get("created_at") or "").replace("Z", "+00:00") - start = datetime.fromisoformat(raw) - if start.tzinfo is None: - start = start.replace(tzinfo=timezone.utc) - age = (datetime.now(timezone.utc) - start).total_seconds() - if age > 120: - st = "failed" - except Exception: - pass + if st == "uploading" and int(r.get("size") or 0) <= 0 and age > 120: + st = "failed" + # 卡死「待上传/录制中」超过 30 分钟 → 失败(人已走、没录像) + if st in {"pending", "recording"} and age > 1800: + st = "failed" play = "" if st == "uploaded": play = _file_public_url(r) @@ -2642,6 +2930,11 @@ def admin_list_room_archives( "://" in play and not play.startswith("http") and not play.startswith("/api/") ): play = "" + room = _room_id_from_row(r) + # 厅 id 也可能在 S3 URL fragment + if not room: + room = (_parse_meta_fragment(str(r.get("path") or "")).get("room") or "")[:120] + ident = _identity_from_archive_row(r, id_index) items.append( { "id": r.get("id"), @@ -2649,7 +2942,12 @@ def admin_list_room_archives( "sessionId": r.get("file_id") or r.get("id") or "", "channelId": r.get("channel_id") or "", "guestId": r.get("guest_id") or "", - "roomId": _room_id_from_row(r), + "guestNick": ident.get("nick") or "", + "guestEmail": ident.get("email") or "", + "guestLabel": ident.get("label") or "", + "nick": ident.get("nick") or "", + "email": ident.get("email") or "", + "roomId": room, "kind": "room-archive", "status": st, "statusLabel": { @@ -2671,12 +2969,44 @@ def admin_list_room_archives( "at": r.get("created_at") or "", } ) + + # 同 guest + room/channel:已有「已上传」则隐藏被取代的空壳 pending/recording + uploaded_keys: set[str] = set() + for x in items: + if x.get("status") != "uploaded": + continue + g = str(x.get("guestId") or "") + room = str(x.get("roomId") or "") + ch = str(x.get("channelId") or "") + if g and room: + uploaded_keys.add(f"{g}|r|{room}") + if g and ch: + uploaded_keys.add(f"{g}|c|{ch}") + if uploaded_keys: + pruned = [] + for x in items: + st = str(x.get("status") or "") + # 同场已有已上传:藏空壳 pending/recording,以及被 supersede 的空 failed + if st in {"pending", "recording", "failed"} and int(x.get("size") or 0) <= 0 and not x.get("url"): + g = str(x.get("guestId") or "") + room = str(x.get("roomId") or "") + ch = str(x.get("channelId") or "") + if (g and room and f"{g}|r|{room}" in uploaded_keys) or ( + g and ch and f"{g}|c|{ch}" in uploaded_keys + ): + continue + pruned.append(x) + items = pruned + if needle: items = [ x for x in items if needle in str(x.get("name") or "").lower() or needle in str(x.get("guestId") or "").lower() + or needle in str(x.get("guestNick") or "").lower() + or needle in str(x.get("guestEmail") or "").lower() + or needle in str(x.get("guestLabel") or "").lower() or needle in str(x.get("channelId") or "").lower() or needle in str(x.get("status") or "").lower() or needle in str(x.get("statusLabel") or "").lower() diff --git a/apps/api/services/social_svc/routers/api.py b/apps/api/services/social_svc/routers/api.py index 7d7d152..de15029 100644 --- a/apps/api/services/social_svc/routers/api.py +++ b/apps/api/services/social_svc/routers/api.py @@ -685,6 +685,8 @@ class RoomArchiveEventIn(BaseModel): seq: int = Field(default=0, ge=0) durationSec: int = Field(default=0, ge=0) startedAt: str = Field(default="", max_length=40) + nick: str = Field(default="", max_length=64) + email: str = Field(default="", max_length=120) @router.post("/room-archives/events") @@ -712,6 +714,8 @@ async def room_archive_event( seq=body.seq, duration_sec=body.durationSec, started_at=body.startedAt, + nick=body.nick, + email=body.email, ) try: @@ -728,6 +732,8 @@ async def upload_file( file: UploadFile = File(...), kind: str = Form(default="file"), session_id: str = Form(default=""), + session_id_q: str | None = Query(default=None, alias="session_id"), + kind_q: str | None = Query(default=None, alias="kind"), x_social_guest_id: str | None = Header(default=None), guest: str | None = Query(default=None), ): @@ -738,6 +744,8 @@ async def upload_file( if len(raw) > SOCIAL_UPLOAD_MAX_BYTES: raise HTTPException(status_code=413, detail="file too large") mime = file.content_type or "application/octet-stream" + # Form 丢字段时用 query 兜底(本地 Next rewrite → 线上 API 曾丢 session_id) + kind = (kind or kind_q or "file").strip() or "file" guessed = kind if guessed in {"room-archive", "meetup-archive"}: guessed = "video" @@ -749,12 +757,22 @@ async def upload_file( elif mime.startswith("audio/"): guessed = "audio" - sid = (session_id or "").strip()[:80] + sid = ((session_id or session_id_q or "").strip())[:80] # 语音/视频厅静默存档 → SeaweedFS S3;元数据 path 写公网 URL if kind in {"room-archive", "meetup-archive"} or ( guessed == "video" and (file.filename or "").startswith("room-") ): + # 无 session 时:挂到该 guest 最近一条未完成的 room-archive,避免孤儿「已上传」 + if not sid: + try: + store.init_db() + sid = store.find_open_room_archive_session( + guest_id=peer, channel_id=channel_id, filename=file.filename or "" + ) or "" + except Exception: + sid = "" + if sid: try: store.init_db() diff --git a/apps/api/services/social_svc/store.py b/apps/api/services/social_svc/store.py index 6d4901a..92d266b 100644 --- a/apps/api/services/social_svc/store.py +++ b/apps/api/services/social_svc/store.py @@ -977,6 +977,21 @@ def upsert_join_lead( ) +def find_open_room_archive_session( + *, + guest_id: str, + channel_id: str = "", + filename: str = "", +) -> str: + from social_svc import pb_data + + return pb_data.find_open_room_archive_session( + guest_id=guest_id, + channel_id=channel_id, + filename=filename, + ) + + def upsert_room_archive_event( *, session_id: str, @@ -992,6 +1007,8 @@ def upsert_room_archive_event( seq: int = 0, duration_sec: int = 0, started_at: str = "", + nick: str = "", + email: str = "", ) -> dict: from social_svc import pb_data @@ -1009,6 +1026,8 @@ def upsert_room_archive_event( seq=seq, duration_sec=duration_sec, started_at=started_at, + nick=nick, + email=email, ) diff --git a/apps/com/admin/src/pages/MediaValue.tsx b/apps/com/admin/src/pages/MediaValue.tsx index 3029667..c019c69 100644 --- a/apps/com/admin/src/pages/MediaValue.tsx +++ b/apps/com/admin/src/pages/MediaValue.tsx @@ -23,7 +23,11 @@ export function looksLikeUrl(v: unknown): v is string { } export function resolveMediaUrl(raw: string): string { - const s = raw.trim() + let s = raw.trim() + // 身份烙在 #nick= / #email=,