Show WA nicknames and auto-fill group subjects in access UI (4.9.1-ops.9).

Fetch groupMetadata.subject on @mentions for group cards; render contact pushName under phone rows so admins are not staring at bare numbers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-05 17:29:43 +08:00
parent e8e58924ca
commit a169b164a8
10 changed files with 268 additions and 182 deletions

View file

@ -12,7 +12,7 @@ import { t } from '../shared/i18n.mjs';
import { ImagePromptError } from '../shared/image-prompt.mjs';
import { trackOutboundArtifactProviderPromise } from '../shared/semantic/artifact.mjs';
import { createWhatsappBridgeStatus, WhatsappHarnessBridge } from './whatsapp-bridge.mjs';
import { enrichWhatsappInboundIdentities } from './whatsapp-identity.mjs';
import { enrichWhatsappInboundIdentities, resolveWhatsappGroupSubject } from './whatsapp-identity.mjs';
import {
gateWhatsappInbound,
loadWhatsappAccessGrant,
@ -754,6 +754,7 @@ export class WhatsappRuntime {
});
if (handled) return;
grant = this.#workspaces.accessGrantFor(this.#botId) ?? grant;
const socket = context?.socket ?? this.#session?.socket;
const gated = await gateWhatsappInbound({
workspaces: this.#workspaces,
botId: this.#botId,
@ -761,6 +762,7 @@ export class WhatsappRuntime {
message,
sendText,
accountJid: this.#config.accountJid,
resolveGroupTitle: (groupJid) => resolveWhatsappGroupSubject(socket, groupJid),
});
if (!gated.allowed) {
if (gated.accessDecision) {