connected accounts follow up (#18998)

- Fixed group emails actions
- Fixed delta updates for folder manager
- Updated crons
This commit is contained in:
neo773
2026-03-26 18:44:49 +05:30
committed by GitHub
parent 36c7c99e34
commit 82611de9b6
12 changed files with 110 additions and 41 deletions
@@ -38,15 +38,17 @@ export class MessageFolderDataAccessService {
private async toCore(
workspaceId: string,
data: Partial<MessageFolderWorkspaceEntity>,
messageChannelId?: string,
): Promise<Record<string, unknown>> {
const coreData: Record<string, unknown> = { ...data, workspaceId };
const parentFolderId = coreData.parentFolderId as string | null;
const channelId = (coreData.messageChannelId as string) ?? messageChannelId;
if (parentFolderId && !uuidValidate(parentFolderId)) {
if (parentFolderId && !uuidValidate(parentFolderId) && channelId) {
const parentFolder = await this.coreRepository.findOne({
where: {
workspaceId,
messageChannelId: coreData.messageChannelId as string,
messageChannelId: channelId,
externalId: parentFolderId,
},
select: ['id'],
@@ -146,9 +148,15 @@ export class MessageFolderDataAccessService {
if (await this.isMigrated(workspaceId)) {
try {
const coreData = await this.toCore(
workspaceId,
data,
(where as Record<string, unknown>).messageChannelId as string,
);
await this.coreRepository.update(
{ ...where, workspaceId } as FindOptionsWhere<MessageFolderEntity>,
data as Record<string, unknown>,
coreData,
);
} catch (error) {
this.logger.error(