chore: More flakey test improvements (#5801)

This commit is contained in:
Tom Moor
2023-09-09 18:30:19 -04:00
committed by GitHub
parent 7270e65f0c
commit 80ef0a38d6
37 changed files with 245 additions and 210 deletions

View File

@@ -70,20 +70,31 @@ router.post(
model: UserAuthentication,
as: "authentications",
required: true,
separate: true,
},
],
});
if (!user) {
Logger.debug("plugins", "No user found for Slack user ID", {
providerId: event.user,
});
return;
}
const auth = await IntegrationAuthentication.findOne({
where: {
service: IntegrationService.Slack,
teamId: user.teamId,
},
});
if (!auth) {
Logger.debug(
"plugins",
"No Slack integration authentication found for team",
{
teamId: user.teamId,
}
);
return;
}
// get content for unfurled links