Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to fetch X last messages from a direct thread? #1263

Open
3 tasks done
Androz2091 opened this issue Aug 27, 2020 · 1 comment
Open
3 tasks done

Is there a way to fetch X last messages from a direct thread? #1263

Androz2091 opened this issue Aug 27, 2020 · 1 comment
Labels
question unconfirmed This issue hasn't been read/confirmed/accepted by an admin

Comments

@Androz2091
Copy link

Form

Put an [x] if you meet the condition, else leave [ ].

Question

Hello, I'm using the following code to retrieve the direct threads:

ig.feed.directInbox().items()

However, only the last 10 messages are returned. Is there any way to fetch more messages? Like:

ig.entity.directThread(THREAD_ID).fetchMessages({ after: 'LAST_CACHED_MESSAGE_ID', count: 100 });
@Androz2091 Androz2091 added question unconfirmed This issue hasn't been read/confirmed/accepted by an admin labels Aug 27, 2020
@Androz2091
Copy link
Author

I read the code and found these files:
https://github.com/dilame/instagram-private-api/blob/3e16058/src/feeds/direct-thread.feed.ts#L14

Would it be possible to add parameters to modify limits? And is the cursor a message ID from which other messages are fetch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question unconfirmed This issue hasn't been read/confirmed/accepted by an admin
Projects
None yet
Development

No branches or pull requests

1 participant