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

Session data is inaccurate. #77

Closed
LewisTehMinerz opened this issue Nov 23, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@LewisTehMinerz
Copy link

commented Nov 23, 2018

https://pantsu.review/7595ea.png

This is my session data when I'm not logged in to Hypixel. This was a game I joined and left for testing, and it appears that the API completely disregards the fact that I can log out of Hypixel or leave the game, and it will still set my session data to this. What I expect is that the session data gets set to null after I disconnect or log out of Hypixel, as this is causing issues with my Discord RPC and my other uses for the API.

@Dance-Dog

This comment has been minimized.

Copy link

commented Nov 23, 2018

As a workaround, I’d recommend that those working to create online statuses with the API take a look at the actual player data and make sure that their last login value is greater than their last logout value before getting their session.

Only when you know that they’re actually online should you really try fetching session data.

@LewisTehMinerz

This comment has been minimized.

Copy link
Author

commented Nov 24, 2018

That doesn't solve the issue though. The session data is still preserved when I leave the game and when I am in a lobby. This shouldn't happen.

@Plancke

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2018

The session data was never meant to be used as an online checker; it's more internal data than anything. This is why we deprecated it from the Java implementation. We'll probably remove the endpoint at some point.

@Plancke Plancke closed this Nov 25, 2018

@LewisTehMinerz

This comment has been minimized.

Copy link
Author

commented Nov 25, 2018

@Plancke

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2018

There's no alternative planned for now

@AgentK20

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2018

The reason the session data still exists is that it's feeding directly from the database that we use for players to rejoin the game that they were in. That's what a "session" is in the codebase. Try it yourself ingame, just hop out of a game and into a lobby, then disconnect from the network and reconnect and you'll be put back in that game. As far as our management systems are concerned, until you join another game or until the old game ends, you are still "playing" that game.

@LewisTehMinerz

This comment has been minimized.

Copy link
Author

commented Nov 26, 2018

Is there a way to figure out if they're in a lobby, or will I just have to run /whereami every 10 seconds?

@builder-247

This comment has been minimized.

Copy link

commented Nov 27, 2018

Is there a way to figure out if they're in a lobby, or will I just have to run /whereami every 10 seconds?

You could just run whereami whenever the world changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.