( data: any, text: string )
| 52 | * Formats the success response for a sent message |
| 53 | */ |
| 54 | export function formatMessageSuccessResponse( |
| 55 | data: any, |
| 56 | text: string |
| 57 | ): { |
| 58 | message: any |
| 59 | ts: string |
| 60 | channel: string |
| 61 | } { |
| 62 | const messageObj = data.message || createDefaultMessageObject(data.ts, text, data.channel) |
| 63 | return { |
| 64 | message: messageObj, |
| 65 | ts: data.ts, |
| 66 | channel: data.channel, |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Uploads files to Slack and returns the uploaded file IDs |
no test coverage detected