Skip to content

Live Chat widget tag with verified signed-in users - #6

Merged
deflinhec merged 1 commit into
mainfrom
claude/project-thread-y7499h
Nov 25, 2026
Merged

deflinhec merged 1 commit into
mainfrom
claude/project-thread-y7499h

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

Brings Hibira Live Chat to Django, matching what hibira-io/laravel-live-chat does for Laravel.

  • {% hibira_live_chat %} renders the chat.hibira.io/w/v1.js widget for HIBIRA["LIVECHAT_WORKSPACE"] (env HIBIRA_LIVECHAT_WORKSPACE); options color, lang, launcher=False. Renders nothing without a workspace.
  • With HIBIRA["LIVECHAT_IDENTITY_SECRET"], a signed-in request.user becomes a verified visitor: data-user-id, data-user-hash = hex(HMAC-SHA256(secret, user.pk)), name and email. Values are HTML-escaped.
  • django_hibira.livechat.identity(user) / user_hash() for SPAs (HibiraLiveChat.identify()).
  • README section, settings table rows, 中文摘要, CHANGELOG (Unreleased).

Testing

  • pytest: 64 passed (6 new: hash, anonymous, options, no secret, verified + escaping, env fallback).

Generated by Claude Code

{% hibira_live_chat %} renders the chat.hibira.io widget for
HIBIRA["LIVECHAT_WORKSPACE"]; with LIVECHAT_IDENTITY_SECRET the signed-in
user's ID is signed (HMAC-SHA256) so they chat as themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCCKScUUX9khSrU2wij
@deflinhec deflinhec self-assigned this Nov 25, 2026
@deflinhec
deflinhec marked this pull request as ready for review November 25, 2026 21:53
@deflinhec
deflinhec merged commit 6de92c4 into main Nov 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants