feat(chat): add contact inbox sources with per-user hide filters
This commit is contained in:
@@ -77,7 +77,7 @@ async function validateSessionFromPeer(peer: any) {
|
||||
}
|
||||
|
||||
async function computeTeamSignature(teamId: string) {
|
||||
const [omniMessageMax, contactMax, contactMessageMax, telegramConnectionMax] = await Promise.all([
|
||||
const [omniMessageMax, contactMax, contactMessageMax, telegramConnectionMax, contactInboxMax, inboxPrefMax] = await Promise.all([
|
||||
prisma.omniMessage.aggregate({
|
||||
where: { teamId },
|
||||
_max: { updatedAt: true },
|
||||
@@ -94,6 +94,14 @@ async function computeTeamSignature(teamId: string) {
|
||||
where: { teamId },
|
||||
_max: { updatedAt: true },
|
||||
}),
|
||||
prisma.contactInbox.aggregate({
|
||||
where: { teamId },
|
||||
_max: { updatedAt: true },
|
||||
}),
|
||||
prisma.contactInboxPreference.aggregate({
|
||||
where: { teamId },
|
||||
_max: { updatedAt: true },
|
||||
}),
|
||||
]);
|
||||
|
||||
return [
|
||||
@@ -101,6 +109,8 @@ async function computeTeamSignature(teamId: string) {
|
||||
contactMax._max.updatedAt?.toISOString() ?? "",
|
||||
contactMessageMax._max.createdAt?.toISOString() ?? "",
|
||||
telegramConnectionMax._max.updatedAt?.toISOString() ?? "",
|
||||
contactInboxMax._max.updatedAt?.toISOString() ?? "",
|
||||
inboxPrefMax._max.updatedAt?.toISOString() ?? "",
|
||||
].join("|");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user