(emails: string[])
| 28 | }); |
| 29 | |
| 30 | async function findChannel(emails: string[]) { |
| 31 | if (!emails || !emails.length) { |
| 32 | return null; |
| 33 | } |
| 34 | for (const email of emails) { |
| 35 | const channel = await linenSdk.getChannel({ integrationId: email }); |
| 36 | if (channel) { |
| 37 | return channel; |
| 38 | } |
| 39 | } |
| 40 | return null; |
| 41 | } |
| 42 | |
| 43 | async function handleInbound(reqBody: any) { |
| 44 | const spam = reqBody.headerLines.find( |
no test coverage detected