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

The way to get user presence of all the followers #1757

Open
3 tasks done
kiyu-git opened this issue Feb 26, 2024 · 0 comments
Open
3 tasks done

The way to get user presence of all the followers #1757

kiyu-git opened this issue Feb 26, 2024 · 0 comments
Labels
question unconfirmed This issue hasn't been read/confirmed/accepted by an admin

Comments

@kiyu-git
Copy link

kiyu-git commented Feb 26, 2024

General Question

Is there any way to get user presence of all the followers?
this issue is related to here.

Notes

I have learned that it is possible to get a list of users online using direct.getPresence().
However, this only returns the status of some users (a dozen or so, not all).

Is it possible to get the user presence of all followers, for example, by using a Cursor method, like the one shown here?

Form

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

Code

const presences = await ig.direct.getPresence();
const userIds = Object.keys(presences["user_presence"]);
userIds.forEach(async (userId) => {
    const userPresence = presences["user_presence"][userId];
    console.log(userPresence["is_active"], new Date(userPresence["last_activity_at_ms"]).toString());
});
@kiyu-git kiyu-git added question unconfirmed This issue hasn't been read/confirmed/accepted by an admin labels Feb 26, 2024
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