-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Currently online display requests all currently online users from API, thus eventually exceeding rate limits #29982
Comments
@ppy/team-web would adjusting the rate limit be feasible? For better context, this is the screen that is triggering this: |
the endpoint probably returns way too much data for what's being used there though. There's a |
@bdach can you check if the data returned is enough? It's mainly missing example{
"users": [
{
"avatar_url": "https://a.ppy.sh/2?1657169614.png",
"country_code": "AU",
"default_group": "default",
"id": 2,
"is_active": true,
"is_bot": false,
"is_deleted": false,
"is_online": false,
"is_supporter": true,
"last_visit": "2024-09-25T07:18:12+00:00",
"pm_friends_only": false,
"profile_colour": "#3366FF",
"username": "peppy",
"country": {
"code": "AU",
"name": "Australia"
},
"cover": {
"custom_url": "https://assets.ppy.sh/user-profile-covers/2/baba245ef60834b769694178f8f6d4f6166c5188c740de084656ad2b80f1eea7.jpeg",
"url": "https://assets.ppy.sh/user-profile-covers/2/baba245ef60834b769694178f8f6d4f6166c5188c740de084656ad2b80f1eea7.jpeg",
"id": null
},
"groups": [
{
"colour": "#0066FF",
"has_listing": false,
"has_playmodes": false,
"id": 33,
"identifier": "ppy",
"is_probationary": false,
"name": "ppy",
"short_name": "PPY",
"playmodes": null
},
{
"colour": "#E45678",
"has_listing": true,
"has_playmodes": false,
"id": 11,
"identifier": "dev",
"is_probationary": false,
"name": "Developers",
"short_name": "DEV",
"playmodes": null
}
]
}
]
} |
As far as I can tell the client is using:
Looking at the web friends page which doesn't have support level shown, maybe we can do without |
I don't think support level is returned in the other endpoint either. Its value is calculated every time iirc. |
Oh you're right actually. The client doesn't show any supporter markers on the currently online display, but it does on the friends display. Yeah I think we can work with that set of fields then. We'll fix client to display supporter badge even if there is no level (is it even possible for API to return a user with |
oh yeah the friend and group page do show it for "list mode" o_O that's weird... also no, the minimum value is 1 for current supporter. |
Originally posted by @bdach in #29968 (comment)
Well that was a bit of misdirection wasn't it, since the original snippet you posted showed the beatmap set request failing, but I'd be willing to bet money on the fact that it's all of these that cause the ratelimit to get exceeded:
To resolve this we'd probably want pagination on that display there, except for the fact that there's a search box in there that allows searching by username, and we can't paginate with username search before these requests, because we only have user IDs to work with at that point....
Would probably need spectator server changes to at least send usernames across the wire. If not more.
The text was updated successfully, but these errors were encountered: