@ -57,8 +57,8 @@ export const computePgGraphQLError = (
|
||||
const error = errors[0];
|
||||
const errorMessage = error?.message;
|
||||
|
||||
const mappedErrorKey = Object.keys(pgGraphQLErrorMapping).find(
|
||||
(key) => errorMessage?.includes(key),
|
||||
const mappedErrorKey = Object.keys(pgGraphQLErrorMapping).find((key) =>
|
||||
errorMessage?.includes(key),
|
||||
);
|
||||
|
||||
const mappedError = mappedErrorKey
|
||||
|
||||
@ -405,9 +405,9 @@ export class TimelineMessagingService {
|
||||
messageThreadIdsForWhichWorkspaceMemberIsNotInParticipants.includes(
|
||||
messageThreadId,
|
||||
)
|
||||
? threadVisibilityByThreadIdForWhichWorkspaceMemberIsNotInParticipants?.[
|
||||
? (threadVisibilityByThreadIdForWhichWorkspaceMemberIsNotInParticipants?.[
|
||||
messageThreadId
|
||||
] ?? MessageChannelVisibility.METADATA
|
||||
] ?? MessageChannelVisibility.METADATA)
|
||||
: MessageChannelVisibility.SHARE_EVERYTHING;
|
||||
|
||||
return threadVisibilityAcc;
|
||||
|
||||
@ -63,9 +63,12 @@ export class MessageQueueCoreModule extends ConfigurableModuleClass {
|
||||
const driverProvider: Provider = {
|
||||
provide: QUEUE_DRIVER,
|
||||
useFactory: async (...args: any[]) => {
|
||||
const config = await options.useFactory!(...args);
|
||||
if (options.useFactory) {
|
||||
const config = await options.useFactory(...args);
|
||||
|
||||
return this.createDriver(config);
|
||||
return this.createDriver(config);
|
||||
}
|
||||
throw new Error('useFactory is not defined');
|
||||
},
|
||||
inject: options.inject || [],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user