Commit 3747ee2
authored
Fix message event struct (#1391)
This has been the source of many bugs.
Slack's docs say that a 'message event' contains a 'message' which is
the same type as other representations of a message in slack. However,
the library has previously represented this as a nested MessageEvent
which is recursively nested. That creates lots of bugs, as you can never
know if you're looking at the outer MessageEvent (which contains the
event information) or the inner MessageEvent (which contains the message
itself).
Instead, we can use our canonical Message instead.
Note that we also have to add a `root` onto Message, as this is
populated for thread_broadcast events (for legacy reasons).3 files changed
+8
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
| 287 | + | |
| 288 | + | |
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
| |||
298 | 297 | | |
299 | 298 | | |
300 | 299 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 300 | | |
315 | 301 | | |
316 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 426 | | |
431 | 427 | | |
432 | 428 | | |
433 | 429 | | |
434 | | - | |
435 | | - | |
| 430 | + | |
| 431 | + | |
436 | 432 | | |
437 | 433 | | |
438 | 434 | | |
| |||
0 commit comments