add support for app_home_opened event
Artem Panko authored 4 years ago
James committed 4 years ago
18 | 18 | ThreadTimeStamp string `json:"thread_ts"` |
19 | 19 | Channel string `json:"channel"` |
20 | 20 | EventTimeStamp json.Number `json:"event_ts"` |
21 | } | |
22 | ||
23 | // AppHomeOpenedEvent Your Slack app home was opened. | |
24 | type AppHomeOpenedEvent struct { | |
25 | Type string `json:"type"` | |
26 | User string `json:"user"` | |
27 | Channel string `json:"channel"` | |
28 | EventTimeStamp json.Number `json:"event_ts"` | |
21 | 29 | } |
22 | 30 | |
23 | 31 | // AppUninstalledEvent Your Slack app was uninstalled. |
227 | 235 | const ( |
228 | 236 | // AppMention is an Events API subscribable event |
229 | 237 | AppMention = "app_mention" |
238 | // AppHomeOpened Your Slack app home was opened | |
239 | AppHomeOpened = "app_home_opened" | |
230 | 240 | // AppUninstalled Your Slack app was uninstalled. |
231 | 241 | AppUninstalled = "app_uninstalled" |
232 | 242 | // GridMigrationFinished An enterprise grid migration has finished on this workspace. |
252 | 262 | // target for the matching event type. |
253 | 263 | var EventsAPIInnerEventMapping = map[string]interface{}{ |
254 | 264 | AppMention: AppMentionEvent{}, |
265 | AppHomeOpened: AppHomeOpenedEvent{}, | |
255 | 266 | AppUninstalled: AppUninstalledEvent{}, |
256 | 267 | GridMigrationFinished: GridMigrationFinishedEvent{}, |
257 | 268 | GridMigrationStarted: GridMigrationStartedEvent{}, |