Skip to content

feat: consent notice on sign-in, and interactive messages people can answer - #6

Open
rvignesh89 wants to merge 3 commits into
web-channel-send-messagesfrom
web-channel-optin-admin-send
Open

feat: consent notice on sign-in, and interactive messages people can answer#6
rvignesh89 wants to merge 3 commits into
web-channel-send-messagesfrom
web-channel-optin-admin-send

Conversation

@rvignesh89

@rvignesh89 rvignesh89 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Part of glific/glific#5713 and epic glific/glific#5659.

Stacked on web-channel-send-messages (#5), not main. Backend half: glific/glific#5717.

The consent notice (#5713)

Glific no longer opts a web login in to WhatsApp; signing in records consent for the web channel alone, in a new per-channel table. The widget has to say so.

The notice sits on the phone-entry step, above the submit button — signing in is what records the consent, so putting it on the OTP step would ask after the number has already been submitted. It names the organisation, taken from the name the widget already fetches.

By continuing, you agree to receive messages from {organisation} on this chat.

A notice rather than a checkbox: consent is implied by continuing, which is the product requirement.

Interactive messages

glific#5717 lets staff send an interactive template to a web contact. Without this the widget rendered it as its plain body: the options were invisible and untappable, so the feature did not actually work end to end.

  • Quick replies show their options as buttons directly under the text.
  • Lists keep their options one level down inside sections. Those are flattened into the same buttons — the widget has no room for WhatsApp's two-step "open the list, then choose", and a chat panel this narrow does not need it.
  • Tapping an option answers with its title as an ordinary text message, which is exactly what WhatsApp records for an interactive reply. Nothing downstream — the message row, the staff inbox, a future flow — has to know it came from a tap.
  • The contact's own echoed choice comes back as plain text and renders without buttons; offering them again would invite someone to answer their own answer.

Staff replies themselves needed no change here: the widget already listens for new_message on the contact's topic and renders flow: "outbound" on the left, so an admin reply appears live with nothing added.

Tests

167 passing. New coverage for the notice (present on the phone step, absent on the OTP step — the second is what catches someone moving it later), and for interactive rendering: quick-reply options, list flattening including a section option's description, the title reported on tap, and no buttons on the contact's own message.

🤖 Generated with Claude Code

https://claude.ai/code/session_015JqHf9PqoGCW27fcNbQnnT

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
glific-web-channel Ready Ready Preview Sep 8, 2026 5:19pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dbf690dd-5a56-4bea-9d05-73f5f52f055b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rvignesh89
rvignesh89 force-pushed the web-channel-optin-admin-send branch from b63341c to 1a06726 Compare September 6, 2026 21:34
@rvignesh89 rvignesh89 changed the title feat: tell people what signing in consents to feat: consent notice on sign-in, and interactive messages people can answer Sep 6, 2026
@rvignesh89
rvignesh89 force-pushed the web-channel-optin-admin-send branch from 0b7b57e to 617b4f2 Compare September 7, 2026 15:07
rvignesh89 and others added 3 commits September 8, 2026 22:49
Glific no longer opts a web login in to WhatsApp (#5713); signing in records
consent for the web channel alone. The notice sits on the phone-entry step,
before the number is submitted, because signing in is what records that consent
— putting it on the OTP step would ask after the fact.

A notice rather than a checkbox: consent is implied by continuing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JqHf9PqoGCW27fcNbQnnT
Staff can now send an interactive template to a web contact (glific#5717), but
the widget rendered it as its plain body — the options were invisible and
untappable, so the feature did not work end to end.

Quick replies show their options directly. A list's options live one level down
inside sections; they are flattened into the same buttons, since the widget has
no room for WhatsApp's two-step "open the list, then choose".

Tapping an option answers with its title as an ordinary text message, which is
exactly what WhatsApp records for an interactive reply — so nothing downstream,
the message row, the staff inbox, a future flow, has to know it came from a tap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JqHf9PqoGCW27fcNbQnnT
The notice was written against the org-name endpoint this branch used before
main replaced it with runtime branding. After the rebase `orgName` no longer
existed and every Login test failed on a ReferenceError.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JqHf9PqoGCW27fcNbQnnT
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.

1 participant