Commit 48aa435
authored
fix(discord): use cached author.id when DMChannel.recipientId is null (#1365)
DMChannel.recipientId can be null when client.channels.fetch() returns
a DM channel with a cold cache. The inbound gate correctly uses
msg.author.id, but fetchAllowedChannel relied on recipientId, so
replies to allowlisted DMs intermittently failed with "channel not
allowlisted" after session restart.
Maintain a channelId→userId map populated during inbound handling and
fall back to it when recipientId is null.
Fixes anthropics/claude-code#40576
Fixes anthropics/claude-code#41647
🏠 Remote-Dev: homespace1 parent 7e401ed commit 48aa435
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
407 | | - | |
| 409 | + | |
| 410 | + | |
408 | 411 | | |
409 | 412 | | |
410 | 413 | | |
| |||
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
826 | 833 | | |
827 | 834 | | |
828 | 835 | | |
| |||
0 commit comments