Repository navigation
Commit 33b389e
committed
fix(slack): grant im:read/mpim:read for DM discovery, guard listDMChannels
conversations.list with types=im,mpim (used to discover DM/MPIM conversation
ids) requires im:read/mpim:read, not im:history/mpim:history — those only
grant reading message content within an already-known conversation. The
"Sync direct messages" optional scope group never requested im:read/mpim:read,
so listDMChannels got missing_scope on every call and never actually
discovered incoming DM conversations.
Worse, listDMChannels didn't guard on the DM scope before calling the API
(unlike its siblings syncCustomEmoji/registerDMWebhook), so a user who
declined DM sync would still hit missing_scope, which is in the permanent
auth-error set — force-flagging the whole connection as needing reconnection
even though nothing was broken.
Add im:read/mpim:read to the dms scope group, and add the same
token.scopes-based guard used by syncCustomEmoji/registerDMWebhook so a
declined scope short-circuits before any API call.1 parent 2127cee commit 33b389e
2 files changed
Lines changed: 84 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
| |||
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
455 | 497 | | |
456 | 498 | | |
457 | 499 | | |
| |||
717 | 759 | | |
718 | 760 | | |
719 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
720 | 773 | | |
721 | 774 | | |
722 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
150 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
| |||
1665 | 1681 | | |
1666 | 1682 | | |
1667 | 1683 | | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1668 | 1691 | | |
1669 | 1692 | | |
1670 | 1693 | | |
1671 | 1694 | | |
1672 | 1695 | | |
1673 | 1696 | | |
1674 | 1697 | | |
1675 | | - | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1680 | 1701 | | |
1681 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1682 | 1706 | | |
1683 | 1707 | | |
1684 | 1708 | | |
| |||
0 commit comments