mirror of https://github.com/buster-so/buster.git
the trigger post processing slack notifier should only look for the analyst post processing messages
This commit is contained in:
parent
7a5b5e28b8
commit
06a5eb38e6
|
@ -88,7 +88,16 @@ export async function getExistingSlackMessageForChat(chatId: string): Promise<{
|
|||
})
|
||||
.from(messagesToSlackMessages)
|
||||
.innerJoin(messages, eq(messages.id, messagesToSlackMessages.messageId))
|
||||
.where(eq(messages.chatId, chatId))
|
||||
.innerJoin(
|
||||
slackMessageTracking,
|
||||
eq(slackMessageTracking.id, messagesToSlackMessages.slackMessageId)
|
||||
)
|
||||
.where(
|
||||
and(
|
||||
eq(messages.chatId, chatId),
|
||||
eq(slackMessageTracking.messageType, SlackMessageSource.ANALYST_MESSAGE_POST_PROCESSING)
|
||||
)
|
||||
)
|
||||
.orderBy(messages.createdAt)
|
||||
.limit(1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue