Commit b0a4b6c
authored
fix(structures): use loadEarlierMsgs options signature in fetchMessages (#201713)
WhatsApp Web changed the signature of WAWebChatLoadMessages.loadEarlierMsgs
from positional (chat, msgCollection) to an options object
{chat, msgCollection, signal, threadId, trigger}.
Calling the old positional form crashes with "Cannot read properties of
undefined (reading 'waitForChatLoading')" because the destructure reads
e.chat on the first positional argument instead of treating the first
argument as the chat.
Updates both Chat.fetchMessages and Channel.fetchMessages to pass the
options object. No other behaviour change.1 parent 11594b2 commit b0a4b6c
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
0 commit comments