feat: real-time email & calendar tabs on record pages (#21953)
emails and calendar tabs only refreshed on reload, unlike timeline. this subscribes to the participant object (messageParticipant / calendarEventParticipant) for the record's related people over the existing sse stream and refetches on change. relatedPersonIds is resolved server-side so any object with the tab inherits it, no per-object code. resolver stays the source of truth so visibility masking is untouched.
This commit is contained in:
+4
@@ -1,5 +1,6 @@
|
||||
import { Field, Int, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { TimelineThreadDTO } from 'src/engine/core-modules/messaging/dtos/timeline-thread.dto';
|
||||
|
||||
@ObjectType('TimelineThreadsWithTotal')
|
||||
@@ -9,4 +10,7 @@ export class TimelineThreadsWithTotalDTO {
|
||||
|
||||
@Field(() => [TimelineThreadDTO])
|
||||
timelineThreads: TimelineThreadDTO[];
|
||||
|
||||
@Field(() => [UUIDScalarType])
|
||||
relatedPersonIds: string[];
|
||||
}
|
||||
|
||||
+3
@@ -34,6 +34,7 @@ export class GetMessagesService {
|
||||
return {
|
||||
totalNumberOfThreads: 0,
|
||||
timelineThreads: [],
|
||||
relatedPersonIds: personIds,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,6 +62,7 @@ export class GetMessagesService {
|
||||
threadParticipantsByThreadId,
|
||||
threadVisibilityByThreadId,
|
||||
),
|
||||
relatedPersonIds: personIds,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -82,6 +84,7 @@ export class GetMessagesService {
|
||||
return {
|
||||
totalNumberOfThreads: 0,
|
||||
timelineThreads: [],
|
||||
relatedPersonIds: [],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user