(payload: any)
| 143 | }; |
| 144 | |
| 145 | async function handleRequest(payload: any) { |
| 146 | const { data, createdAt, organizationId } = payload; |
| 147 | const action = payload.action as Actions; |
| 148 | const type = payload.type as Types; |
| 149 | |
| 150 | if (!data.creatorId && !data.userId) { |
| 151 | // skip from our bot |
| 152 | return 'message from bot'; |
| 153 | } |
| 154 | |
| 155 | // call handler |
| 156 | await handlersMap[type][action](data); |
| 157 | } |
| 158 | |
| 159 | async function handleUser( |
| 160 | channel: { id: string; accountId: string }, |