Skip to content

Commit

Permalink
Fix message direction seeds (#6760)
Browse files Browse the repository at this point in the history
Direction is now on mcma and no longer on message
  • Loading branch information
bosiraphael authored Aug 28, 2024
1 parent 374931b commit da23ca3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { EntityManager } from 'typeorm';

import { DEV_SEED_MESSAGE_CHANNEL_IDS } from 'src/database/typeorm-seeds/workspace/message-channels';
import { DEV_SEED_MESSAGE_IDS } from 'src/database/typeorm-seeds/workspace/messages';
import { MessageDirection } from 'src/modules/messaging/common/enums/message-direction.enum';

const tableName = 'messageChannelMessageAssociation';

Expand All @@ -27,6 +28,7 @@ export const seedMessageChannelMessageAssociation = async (
'messageExternalId',
'messageId',
'messageChannelId',
'direction',
])
.orIgnore()
.values([
Expand All @@ -39,6 +41,7 @@ export const seedMessageChannelMessageAssociation = async (
messageExternalId: null,
messageId: DEV_SEED_MESSAGE_IDS.MESSAGE_1,
messageChannelId: DEV_SEED_MESSAGE_CHANNEL_IDS.TIM,
direction: MessageDirection.OUTGOING,
},
{
id: DEV_SEED_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_IDS.MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_2,
Expand All @@ -49,6 +52,7 @@ export const seedMessageChannelMessageAssociation = async (
messageExternalId: null,
messageId: DEV_SEED_MESSAGE_IDS.MESSAGE_2,
messageChannelId: DEV_SEED_MESSAGE_CHANNEL_IDS.TIM,
direction: MessageDirection.OUTGOING,
},
{
id: DEV_SEED_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_IDS.MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_3,
Expand All @@ -59,6 +63,7 @@ export const seedMessageChannelMessageAssociation = async (
messageExternalId: null,
messageId: DEV_SEED_MESSAGE_IDS.MESSAGE_3,
messageChannelId: DEV_SEED_MESSAGE_CHANNEL_IDS.TIM,
direction: MessageDirection.INCOMING,
},
])
.execute();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { EntityManager } from 'typeorm';

import { DEV_SEED_MESSAGE_THREAD_IDS } from 'src/database/typeorm-seeds/workspace/message-threads';
import { MessageDirection } from 'src/modules/messaging/common/enums/message-direction.enum';

const tableName = 'message';

Expand All @@ -26,7 +25,6 @@ export const seedMessage = async (
'receivedAt',
'text',
'subject',
'direction',
'messageThreadId',
'headerMessageId',
])
Expand All @@ -40,7 +38,6 @@ export const seedMessage = async (
receivedAt: new Date(),
text: 'Hello, \n I hope this email finds you well. I am writing to request a meeting. I believe it would be beneficial for both parties to collaborate and explore potential opportunities. Would you be available for a meeting sometime next week? Please let me know your availability, and I will arrange a suitable time. \n Looking forward to your response.\n Best regards',
subject: 'Meeting Request',
direction: MessageDirection.OUTGOING,
messageThreadId: DEV_SEED_MESSAGE_THREAD_IDS.MESSAGE_THREAD_1,
headerMessageId: '99ef24a8-2b8a-405d-8f42-e820ca921421',
},
Expand All @@ -52,7 +49,6 @@ export const seedMessage = async (
receivedAt: new Date(),
text: 'Good Morning,\n I am writing to inquire about information. Could you please provide me with details regarding this topic? \n Your assistance in this matter would be greatly appreciated. Thank you in advance for your prompt response. \n Best regards,Tim',
subject: 'Inquiry Regarding Topic',
direction: MessageDirection.OUTGOING,
messageThreadId: DEV_SEED_MESSAGE_THREAD_IDS.MESSAGE_THREAD_2,
headerMessageId: '8f804a9a-04c8-4f24-93f2-764948e95014',
},
Expand All @@ -64,7 +60,6 @@ export const seedMessage = async (
receivedAt: new Date(),
text: 'Good Evening,\nI wanted to extend my sincere gratitude for taking the time to meet with me earlier today. It was a pleasure discussing with you, and I am excited about the potential opportunities for collaboration. \n Please feel free to reach out if you have any further questions or require additional information. I look forward to our continued communication. Best regards.',
subject: 'Thank You for the Meeting',
direction: MessageDirection.INCOMING,
messageThreadId: DEV_SEED_MESSAGE_THREAD_IDS.MESSAGE_THREAD_1,
headerMessageId: '3939d68a-ac6b-4f86-87a2-5f5f9d1b6481',
},
Expand Down

0 comments on commit da23ca3

Please sign in to comment.