Add internal org chat (phase 1) with DM, groups, and org settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-29 10:34:01 +03:30
co-authored by Cursor
parent 589c763ef8
commit a1655432fc
21 changed files with 1912 additions and 8 deletions
@@ -0,0 +1,10 @@
/** شناسه پایدار کاربر در سرویس چت خارجی (scoped به org) */
export function buildChatUserId(organizationId: string, userId: string): string {
const o = organizationId.replace(/-/g, '').slice(0, 12);
const u = userId.replace(/-/g, '').slice(0, 12);
return `m${o}u${u}`;
}
export function dmPairKey(userA: string, userB: string): [string, string] {
return userA < userB ? [userA, userB] : [userB, userA];
}