LGTM

Looks Good To Me

HipChat ゲストアクセス時も履歴を保存したい

Read in English

HipChat は無料プランでもゲストを招待できて便利だけど,招待された側は履歴をたどれなくて不便.

  • 自分がオフラインだった期間の履歴は読めない
  • 前回ゲストとして発言した自分の履歴も読めない
  • タブを閉じたり,リロードしても消える

毎回まっさらな状態から始まって「前回ログインしたA さん」と「今回ログインしたA さん」を別人として扱うのは,サービスとしてまっとうな実装に見える.

Chrome Extension でなんとかした

でも不便なので,Chrome Extension 作った.

chrome.google.com

自分がオンラインだった期間の履歴を,Chrome が自動保存して 次回ログイン時に復元する.

私の環境だとうまく動いているけど,beforeunload をフックしていて,場合によっては自動保存の前にログアウトが走ってしまって動かないかもしれない.その場合はご連絡ください.

Guest access to HipChat

HipChat is a cool chat service which enables "guest mode" even in a free plan, but its security policy is sometimes annoying.

  1. Chat history never show up, if it was done while a guest was offline.
  2. History is always gone after logging in again, even the guest's words.
  3. Closing or reloading HipChat tab mistakenly causes a history blackout.

This behavior looks secure enough as it's complicated for the service to identify a guest every time and display only visible chat history with no security risk.

Auto-save and restore in browser side

chrome.google.com

HipChat Pin is a Chrome extension which automatically saves chat history in guest mode and restores when logging in next time.

Note that it has a potential timing issue of beforeunload callback. Please contact me if it doesn't work in your Chrome. I have some ideas to fix it.