Skip to content

Commit

Permalink
fix: Fixed turnary
Browse files Browse the repository at this point in the history
  • Loading branch information
noahonyejese committed Oct 21, 2024
1 parent aed4103 commit c32eecf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/slack/syncs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import * as emoji from 'node-emoji';

export const validateMessageSlackEvent = (event: MessageEvent) => {
if (
!(event?.user && event?.message?.user) ||
!(event?.user || event?.message?.user) ||
!event?.channel ||
event?.type !== 'message' ||
(typeof event.user !== 'string' &&
typeof event?.message?.user !== 'string') ||
!(
typeof event.user === 'string' || typeof event?.message?.user === 'string'
) ||
typeof event.channel !== 'string'
) {
console.log(event);
Expand Down

0 comments on commit c32eecf

Please sign in to comment.