Deprecate share email thread (#9319)
## Context Following this https://github.com/twentyhq/twenty/issues/4199 This has not been fully implemented, after 5months of dead code I'm removing the feature for the time being until we re-prioritise the feature (unlikely during these next 6 months) to keep the codebase a bit cleaner (no need to maintain dead features) Feel free to reopen / revert this PR once feature is ready ## Test locally after importing emails
This commit is contained in:
@ -2,13 +2,7 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi
|
||||
import { RecordGqlOperationSignatureFactory } from '@/object-record/graphql/types/RecordGqlOperationSignatureFactory';
|
||||
|
||||
export const fetchAllThreadMessagesOperationSignatureFactory: RecordGqlOperationSignatureFactory =
|
||||
({
|
||||
messageThreadId,
|
||||
isSubscribersEnabled,
|
||||
}: {
|
||||
messageThreadId: string;
|
||||
isSubscribersEnabled: boolean;
|
||||
}) => ({
|
||||
({ messageThreadId }: { messageThreadId: string }) => ({
|
||||
objectNameSingular: CoreObjectNameSingular.Message,
|
||||
variables: {
|
||||
filter: {
|
||||
@ -33,15 +27,6 @@ export const fetchAllThreadMessagesOperationSignatureFactory: RecordGqlOperation
|
||||
receivedAt: true,
|
||||
messageThread: {
|
||||
id: true,
|
||||
subscribers: isSubscribersEnabled
|
||||
? {
|
||||
workspaceMember: {
|
||||
id: true,
|
||||
name: true,
|
||||
avatarUrl: true,
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
messageParticipants: {
|
||||
id: true,
|
||||
|
||||
@ -14,9 +14,7 @@ import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
||||
import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';
|
||||
import { viewableRecordIdState } from '@/object-record/record-right-drawer/states/viewableRecordIdState';
|
||||
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { isDefined } from 'twenty-ui';
|
||||
import { FeatureFlagKey } from '~/generated/graphql';
|
||||
|
||||
export const useRightDrawerEmailThread = () => {
|
||||
const viewableRecordId = useRecoilValue(viewableRecordIdState);
|
||||
@ -38,14 +36,9 @@ export const useRightDrawerEmailThread = () => {
|
||||
},
|
||||
});
|
||||
|
||||
const isMessageThreadSubscribersEnabled = useIsFeatureEnabled(
|
||||
FeatureFlagKey.IsMessageThreadSubscriberEnabled,
|
||||
);
|
||||
|
||||
const FETCH_ALL_MESSAGES_OPERATION_SIGNATURE =
|
||||
fetchAllThreadMessagesOperationSignatureFactory({
|
||||
messageThreadId: viewableRecordId,
|
||||
isSubscribersEnabled: isMessageThreadSubscribersEnabled,
|
||||
});
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user