Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ You can also use the root-level [management scripts](#management-scripts) to han
Open `http://127.0.0.1:3789`. If `session.json` can be reused, you enter the chat interface directly; otherwise, click 「產生登入 QR code」 (Generate login QR code), scan with a secondary account, and confirm the displayed PIN. The QR URL and PIN are sent only once over WebSocket to the connection that clicked the button; they are not logged or written to files, and refreshing does not replay them. Failures do not trigger automatic retries; click the button again. The left side has 「聊天」 (Chats) and 「好友」 (Friends) tabs, including profile pictures and unread counts. The Chats tab is ordered by recent activity; each row shows the last message (prefixed with the sender's name in groups and OpenChat) and its time (the clock today, 「昨天」 (yesterday), otherwise the date), taken from LINE's chat summaries on load and then kept current by live messages, edits and take-backs. Messages appear on the right: consecutive messages from the same person share a profile picture and name (full names do not wrap; OpenChat administrators have a crown badge and co-administrators a shield badge), timestamps appear after messages in 24-hour format, with a date separator above each day's messages (今天/昨天 (today/yesterday) or the date, with the year when it differs), and scrolling upward loads older history. When you scroll away from the newest message, a 「↓ 最新訊息」 (↓ Latest) button appears at the bottom right (it becomes 「↓ N 則新訊息」 (↓ N new messages) when others' messages arrive meanwhile; click to return to the bottom). Your own messages display 「已讀」 (Seen) above the timestamp in 1:1 chats, or 「已讀 N」 (Seen by N) in groups and chat rooms; OpenChat has no read receipts. Opening a chat with unread messages shows an unread separator. You can send text (Enter to send, Shift+Enter for a new line), images (click 「媒體」 (Media) to pick several at once, or **paste/drag** multiple images/videos into the input field; they preview first and, on 送出 (Send), upload one at a time with a 「第 n/N 個」 (item n/N) and upload-percentage indicator, and any draft text is sent after the whole selection; PNG/JPEG/GIF images and MP4/MOV videos only), and stickers (the 「貼圖」 (Stickers) panel lists packs owned by this account; click a sticker to send it, or send manually by ID). Received images/GIFs display directly (click to enlarge), videos load only when you press play, and voice messages can be played directly, and message search (searches only loaded messages: type a keyword in 「搜尋」 (Search) in the header, or press Ctrl/⌘+K; matches are highlighted, and clicking a result jumps to that message and opens its chat). Locations, contacts, files and rich (flex) cards are shown as small cards with the text LINE attaches (place name, address and an 「在地圖上開啟」 (Open in map) link; contact name; file name, size and a 「下載」 (Download) link; the card's alternative text). Files are always served as attachments (`Content-Disposition: attachment`, `application/octet-stream`; the browser never opens or runs them in this page), only for file messages this service has received, never after a take-back, and E2EE OpenChat files cannot be downloaded. Calls and other types show type placeholders only. **Sending read receipts**: when the chat is open and the page is visible, the client reports to LINE that messages up to the latest one have been read (the other person sees 「已讀」 (Seen)); disable this with `chat.sendReadReceipts: false`. Clicking 「登出」 (Log out) at the top right opens a confirmation dialog; confirming revokes the LINE-side login and clears `session.json` and the cache.

**Other web behavior**:
- **Optional daily-summary panel**: On Windows, when a compatible external summary companion is installed, the chat header shows 「每日摘要」 (Daily summary). It lets you search, select, and save chats, then manually create a summary for today. The button stays hidden without the companion. Scheduling and Notion/n8n configuration belong to the external tool and are not included in this repository. See the [companion integration contract](docs/daily-summary-companion.md).
- **Links**: `http://` and `https://` URLs in message text become clickable links that open in a new tab (with `rel="noopener noreferrer"`, so the destination cannot access this page and receives no Referer). Trailing punctuation and extra closing parentheses are excluded from URLs; other protocols (such as `ftp://`) are not linked. The server does not fetch any URLs, and there are no link preview cards (deliberately: CSP and CORS prevent browser-side access, while server-side fetching risks SSRF and IP disclosure).
- **System messages**: LINE membership events (`CHATEVENT`, currently supporting `C_MI`) display as small, centered gray pills, such as 「XX 新增 OO 至群組」 (XX added OO to the group). Other event types whose meanings have not been confirmed always display the placeholder 「[系統訊息]」 ([System message]); their content is not guessed.
- **Take-backs**: when someone (or you, on another device) takes a message back, it becomes 「XX 已收回訊息」 (XX took back a message; your own read 「你已收回訊息」), replies quoting it show 「[已收回的訊息]」 ([Message taken back]), and its picture/video/voice/file is no longer served. If the take-back notice arrives before the message itself, only the placeholder is shown. Only message ids this service has already received are affected; nothing is guessed from the notice. Your own messages can be taken back with 「收回」 (Take back) in the context menu (after a confirmation; LINE only allows this for a limited time after sending, and a refusal shows a generic error). In OpenChat, the service recognizes your member id there only after you have sent a message from this page.
Expand Down
1 change: 1 addition & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ npm start
`http://127.0.0.1:3789` を開きます。再利用できる `session.json` があれば、そのままチャット画面に進みます。それ以外は「產生登入 QR code」(ログイン用 QR code を生成)をクリックし、サブアカウントで読み取って画面の PIN を確認します。QR URL と PIN は、ボタンを押した接続にだけ WebSocket で 1 回送信され、ログやファイルには保存されません。ページを再読み込みしても再送されません。失敗時に自動で繰り返すことはなく、もう一度ボタンを押す必要があります。左側には「聊天」(チャット)と「好友」(友だち)の 2 つのタブがあり、プロフィール画像と未読数も表示します。「聊天」タブは最近のやり取り順に並び、各行に最後のメッセージ(グループとオープンチャットでは送信者名を先頭に付けます)と時刻(今日は時刻、昨日は「昨天」(昨日)、それ以前は日付)を表示します。読み込み時は LINE のチャット概要から取得し、その後はリアルタイムのメッセージ、編集、送信取消に合わせて更新します。右側にはメッセージを表示します。同じ人の連続したメッセージは画像と名前をまとめて表示します(名前は省略・改行せず、オープンチャットの管理者には王冠、共同管理者には盾のバッジを表示)。時刻は 24 時間表記でメッセージの後ろに表示し、日ごとのメッセージの上に日付の区切り(今天/昨天(今日/昨日)または月日。年が違う場合は年も)を表示し、上にスクロールすると以前の履歴を読み込みます。最新メッセージから離れてスクロールすると、右下に「↓ 最新訊息」(↓ 最新)ボタンを表示します(その間にほかの人のメッセージが届くと「↓ N 則新訊息」(↓ 新着 N 件)に変わり、クリックで最下部に戻ります)。自分が送信したメッセージは時刻の上に「已讀」(既読、1 対 1)または「已讀 N」(既読 N、グループとチャットルーム)を表示します。オープンチャットには既読通知はありません。未読のあるチャットを開くと未読の区切り線を表示します。テキスト(Enter で送信、Shift+Enter で改行)、画像(「媒體」(メディア)で複数まとめて選ぶか、入力欄に画像/動画を複数**貼り付け/ドラッグ**。先にプレビューを表示し、「送出」(送信)で「第 n/N 個」(n/N 個目)とアップロード率を表示しながら 1 件ずつ送信し、下書きのテキストがあれば最後のファイルの後に送信します。PNG/JPEG/GIF 画像と MP4/MOV 動画のみ)、スタンプ(「貼圖」(スタンプ)パネルにこのアカウントの所有済みスタンプパックを表示し、クリックすると即送信。ID による手動送信も可能)を送信できます。受信した画像/GIF は直接表示し(クリックで拡大)、動画は再生を押してから読み込み、音声は直接再生できます。また、メッセージ検索(読み込み済みのメッセージのみを検索。タイトルバーの「搜尋」(検索)または Ctrl/⌘+K でキーワードを入力すると一致箇所を強調表示し、結果をクリックするとそのメッセージへ移動してそのチャットを開きます)。位置情報、連絡先、ファイル、カードメッセージは、LINE が付ける文字情報を小さなカードで表示します(位置の名前、住所と「在地圖上開啟」(地図で開く)リンク、連絡先の名前、ファイル名とサイズと「下載」(ダウンロード)リンク、カードの代替テキスト)。ファイルは常に添付ファイルとして提供します(`Content-Disposition: attachment`、`application/octet-stream`。ブラウザーはこのページで開いたり実行したりしません)。このサービスが受信したファイルメッセージのみ対象で、送信取消後は提供せず、E2EE のオープンチャットのファイルはダウンロードできません。通話などそのほかの種類は、種類のプレースホルダーのみ表示します。**既読通知**:チャット画面を開き、ページが表示されている間、最新メッセージまで既読として LINE に通知します(相手には「已讀」(既読)と表示されます)。`chat.sendReadReceipts: false` で無効にできます。右上の「登出」(ログアウト)を押すと確認ダイアログを表示し、確認後に LINE 側のログインを取り消して `session.json` とキャッシュを消去します。

**そのほかの Web ページの動作**:
- **任意の毎日要約パネル**:Windows で互換性のある外部要約ツールがインストールされている場合、チャットの見出しに「每日摘要」(毎日要約)が表示されます。チャットの検索・選択・保存と、今日の要約の手動作成ができます。外部ツールがない場合、ボタンは表示されません。スケジュールと Notion/n8n の設定は外部ツール側で管理し、このリポジトリには含まれません。[連携仕様](docs/daily-summary-companion.md)を参照してください。
- **リンク**:メッセージ内の `http://`、`https://` URL はクリック可能なリンクになり、新しいタブで開きます(`rel="noopener noreferrer"` を付けるため、相手のサイトはこのページを参照できず、Referer も受け取りません)。文末の句読点や余分な閉じ括弧は URL に含めず、ほかのプロトコル(`ftp://` など)はリンクに変換しません。サーバーは URL を取得せず、リンクプレビューカードもありません(意図的に実装していません。ブラウザー側では CSP と CORS により読み取れず、サーバーで代わりに取得すると SSRF と IP 漏えいのリスクがあります)。
- **システムメッセージ**:LINE のメンバー変更イベント(`CHATEVENT`、現在は `C_MI` に対応)は、中央寄せの小さな灰色のカプセルとして表示します。例:「XX 新增 OO 至群組」(XX が OO をグループに追加)。意味を確認できていないほかのイベントは、すべて「[系統訊息]」(システムメッセージ)のプレースホルダーとし、内容を推測しません。
- **送信取消**:相手(または別の端末のあなた)がメッセージの送信を取り消すと、そのメッセージは「XX 已收回訊息」(XX がメッセージの送信を取り消しました。自分の場合は「你已收回訊息」)に変わり、それを引用した返信は「[已收回的訊息]」(取り消されたメッセージ)と表示し、画像/動画/音声も提供しなくなります。取り消し通知がメッセージ本体より先に届いた場合も、プレースホルダーのみ表示します。対象はこのサービスが受信済みのメッセージ id のみで、通知の内容から推測はしません。自分のメッセージは右クリックメニューの「收回」(送信取消)で取り消せます(先に確認します。LINE が取り消しを認めるのは送信後の一定時間内のみで、拒否された場合は汎用エラーを表示します)。オープンチャットでは、このページから一度メッセージを送ると、サービスがそのオープンチャットでのあなたのメンバー id を認識します。
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ npm start
開啟 `http://127.0.0.1:3789`。有可復用的 `session.json` 時直接進入聊天視窗;否則點「產生登入 QR code」,用次要帳號掃描並確認畫面 PIN。QR URL 與 PIN 只經 WebSocket 送給按下按鈕的那個連線一次,不入日誌或檔案;重新整理不會重播。失敗不自動循環,須再按按鈕。左側分「聊天」與「好友」兩個分頁(含大頭照與未讀數);「聊天」分頁依最近活動排序,每列顯示最後一則訊息(群組與社群前面加寄件者名稱)與時間(今天顯示時刻、昨天顯示「昨天」,更早顯示日期),載入時取自 LINE 的聊天摘要,之後隨即時訊息、編輯與收回更新;右側為訊息:連續同一人的訊息合併顯示頭像與名稱(名稱完整不斷行;社群管理員旁有皇冠、共同管理員旁有盾牌徽章)、時間(24 小時制)顯示在訊息後方、每天的訊息上方有日期分隔(今天/昨天/月日,跨年加年份)、往上捲動載入更早的歷史、捲離最新訊息時右下角出現「↓ 最新訊息」按鈕(期間收到他人的訊息會改為「↓ N 則新訊息」,點一下回到最底)、自己發的訊息在時間上方顯示「已讀」(1 對 1)或「已讀 N」(群組與聊天室;社群沒有已讀回執)、開啟有未讀的聊天會標出未讀分隔線。可傳送文字(Enter 送出、Shift+Enter 換行)、圖片(按「媒體」可一次選多個,或直接在輸入框**貼上/拖入**多張圖片/影片;先出現預覽,按「送出」後依序逐檔上傳,顯示「第 n/N 個」與上傳百分比,最後若有草稿文字則一併在全部檔案之後送出;僅 PNG/JPEG/GIF 圖片與 MP4/MOV 影片)與貼圖(「貼圖」面板列出此帳號已擁有的貼圖包,點一下即送出;也可用 ID 手動送出);收到的圖片/GIF 直接顯示(點擊放大)、影片按下播放才載入、語音可直接播放、訊息搜尋(只搜尋已載入的訊息:點標題列「搜尋」或按 Ctrl/⌘+K 輸入關鍵字,符合的訊息以底色標示,點結果會跳到該訊息並開啟所屬聊天室)。位置、聯絡人、檔案與卡片訊息以小卡顯示 LINE 附帶的文字資訊(位置的名稱、地址與「在地圖上開啟」連結;聯絡人名稱;檔名、大小與「下載」連結;卡片訊息的替代文字)。檔案一律以附件下載(`Content-Disposition: attachment`、`application/octet-stream`,瀏覽器不會在此頁開啟或執行內容),只限本服務收過的檔案訊息,收回後不再提供,E2EE 社群檔案無法下載;通話等其他類型只顯示類型佔位。**已讀回報**:聊天視窗開著且頁面可見時,會對 LINE 回報已讀到最新訊息(對方會看到「已讀」),可用 `chat.sendReadReceipts: false` 關閉。右上「登出」會先跳出確認框,確認後撤銷 LINE 端登入並清除 `session.json` 與快取。

**其他網頁行為**:
- **選用的每日摘要面板**:Windows 上有安裝相容的外部摘要工具時,聊天標題列顯示「每日摘要」,可搜尋、勾選並儲存聊天室,再手動建立今天的摘要。沒有安裝時按鈕不顯示;排程與 Notion/n8n 設定由外部工具管理,不包含在本倉庫。介面契約見 [摘要工具整合說明](docs/daily-summary-companion.md)。
- **連結**:訊息文字中的 `http://`、`https://` 網址會變成可點的連結,在新分頁開啟(帶 `rel="noopener noreferrer"`,對方網站拿不到本頁,也不會收到 Referer);句尾標點與多餘的右括號不算進網址,其他協定(如 `ftp://`)不轉連結。伺服器不會去抓取任何網址,也沒有連結預覽卡片(刻意不做:瀏覽器端受 CSP 與 CORS 限制讀不到,伺服器代抓則有 SSRF 與洩露 IP 的風險)。
- **系統訊息**:LINE 的成員異動事件(`CHATEVENT`,目前支援 `C_MI`)顯示為置中的灰色小膠囊,例如「XX 新增 OO 至群組」;其他未確認含義的事件類型一律顯示「[系統訊息]」佔位,不猜測內容。
- **收回**:對方(或你在其他裝置上)收回訊息時,該訊息改為「XX 已收回訊息」(自己的顯示「你已收回訊息」),引用它的回覆顯示「[已收回的訊息]」,圖片/影片/語音/檔案也不再提供下載;收回通知比訊息本身先到時同樣只顯示佔位。只處理本服務已收過的訊息 id,不依通知內容猜測是哪一則。自己的訊息可在右鍵選單按「收回」(會先確認;LINE 只允許收回一段時間內送出的訊息,被拒時顯示一般錯誤);社群裡要先從此頁送過訊息,服務才認得你在該社群的成員 id。
Expand Down
Loading