(3) an external account set private (and NOT visible by the bot)
post a story with account 3. Log in to account 2 and share that private story with the bot account by DM. Try to run Client.login(). This will throw the error:
(node:22369) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'user' of undefined
at new Message (/home/dcts/code/insta.js/src/structures/Message.js:80:83)
at /home/dcts/code/insta.js/src/structures/Chat.js:76:49
at Array.forEach (<anonymous>)
at Chat._patch (/home/dcts/code/insta.js/src/structures/Chat.js:75:24)
at new Chat (/home/dcts/code/insta.js/src/structures/Chat.js:53:14)
at /home/dcts/code/insta.js/src/structures/Client.js:374:26
at Array.forEach (<anonymous>)
at Client.login (/home/dcts/code/insta.js/src/structures/Client.js:373:17)
This error is caused because the case of a hidden story share is not catched. I added a pull request that fixes this issue by catching unavailible stories before initializing the message object.
how to reproduce bug
you need 3 accounts to test this:
post a story with account 3. Log in to account 2 and share that private story with the bot account by DM. Try to run
Client.login()
. This will throw the error:This error is caused because the case of a hidden story share is not catched. I added a pull request that fixes this issue by catching unavailible stories before initializing the message object.