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

Android app does not handle pagination when requesting /api/v1/settings.public #5218

Closed
krokodilerian opened this issue Sep 21, 2023 · 0 comments · Fixed by #5177
Closed

Comments

@krokodilerian
Copy link

Description:

Android client does not handle pagination when requesting /api/v1/settings.public, leading to missed settings (and in my case, no login button shown in the app).

Environment Information:

  • Rocket.Chat Server Version: 6.3.6
  • Rocket.Chat App Version: 4.40.0.47250
  • Device Name: Cubot pocket
  • OS Version: Android 11

Steps to reproduce:

  1. Configure 10 or less "Default Count" in Settings -> General -> REST API
  2. Try to open the application and log in
  3. Even if Accounts_ShowFormLogin is enabled on the server, the Login button won't show up (as that's usually below the rest)

Expected behavior:

Login button to show. (the app to follow the pagination)

Actual behavior:

No login button shows up.

Additional context:

The query sent by the App is:

https://URL/api/v1/settings.public?query={%22_id%22:{%22$in%22:[%22API_Gitlab_URL%22,%22CAS_enabled%22,%22CAS_login_url%22,%22Accounts_EmailVerification%22,%22Accounts_ManuallyApproveNewUsers%22,%22Accounts_ShowFormLogin%22,%22Site_Url%22,%22Accounts_RegistrationForm%22,%22Accounts_RegistrationForm_LinkReplacementText%22,%22Accounts_EmailOrUsernamePlaceholder%22,%22Accounts_PasswordPlaceholder%22,%22Accounts_PasswordReset%22,%22Accounts_iframe_enabled%22,%22Accounts_Iframe_api_url%22,%22Accounts_Iframe_api_method%22]}}

The return result, if the default count is less than 10, ends with:

  "count": 10,
  "offset": 0,
  "total": 15,
  "success": true

The app does not try to get the rest, but just proceeds with whatever was returned.

At some point, the default count was 10, and it's possible that during some upgrade its increase was missed, thus leading to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant