feat(web): add group chat mention support

This commit is contained in:
Peter Steinberger
2025-12-03 12:35:18 +00:00
parent 273f2b61d0
commit 6afe6f4ecb
10 changed files with 395 additions and 32 deletions

View File

@@ -59,5 +59,12 @@ export async function saveSessionStore(
export function deriveSessionKey(scope: SessionScope, ctx: MsgContext) {
if (scope === "global") return "global";
const from = ctx.From ? normalizeE164(ctx.From) : "";
// Preserve group conversations as distinct buckets
if (typeof ctx.From === "string" && ctx.From.includes("@g.us")) {
return `group:${ctx.From}`;
}
if (typeof ctx.From === "string" && ctx.From.startsWith("group:")) {
return ctx.From;
}
return from || "unknown";
}