mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-19 03:50:45 +08:00
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:
parent
e8e58924ca
commit
a169b164a8
10 changed files with 268 additions and 182 deletions
|
|
@ -194,6 +194,7 @@ export async function gateWhatsappInbound({
|
|||
message,
|
||||
sendText,
|
||||
accountJid,
|
||||
resolveGroupTitle,
|
||||
}) {
|
||||
const { phone, lid } = resolveInboundPhone(message);
|
||||
const scene = message.kind === 'group' ? 'group' : 'direct';
|
||||
|
|
@ -205,7 +206,15 @@ export async function gateWhatsappInbound({
|
|||
current = await rememberWhatsappContact(workspaces, botId, current, message, { phone, lid });
|
||||
}
|
||||
if (scene === 'group' && addressed && message.conversationId) {
|
||||
const title = message.contextSource?.()?.conversationTitle;
|
||||
let title = message.contextSource?.()?.conversationTitle;
|
||||
const existingTitle = current.groups?.[message.conversationId]?.title;
|
||||
if (!title && !existingTitle && typeof resolveGroupTitle === 'function') {
|
||||
try {
|
||||
title = await resolveGroupTitle(message.conversationId);
|
||||
} catch {
|
||||
title = '';
|
||||
}
|
||||
}
|
||||
const withGroup = ensureGroupBucket(current, message.conversationId, {
|
||||
...(title ? { title } : {}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue