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

Refresh AppData and capabilities without re-login #198

Closed
ShGKme opened this issue May 22, 2023 · 2 comments · Fixed by #247
Closed

Refresh AppData and capabilities without re-login #198

ShGKme opened this issue May 22, 2023 · 2 comments · Fixed by #247
Assignees
Labels
1. to develop bug Something isn't working
Milestone

Comments

@ShGKme
Copy link
Contributor

ShGKme commented May 22, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Login in Talk Desktop
  2. Update Talk on the server, update Talk settings on the server
  3. Get Nextcloud Talk was updated, you need to reload the page message
  4. Reload the page

Or

  1. Login in Talk Desktop and close the client
  2. Update Talk on the server, update Talk settings on the server
  3. Open the desktop client

Expected behavior

Talk Desktop has new settings (capabilities) and other server data.

Actual behavior

Talk Desktop has values that were stored after the login.

  • In the first scenario, reload doesn't help.

  • In the second scenario, after the application restart, it even doesn't know, that AppData is not valid.

    Talk has x-nextcloud-talk-hash header. But currently, it is not correct in Talk Desktop. Its initial
    value is set on the first conversations list load while Talk Desktop stores capabilities in AppData from
    login.

Proposals

Re-request AppData on application start

The app loading is longer.

Not correct according to Nextcloud Talk was updated, you need to reload the page message. Should restart the application instead of reloading or changing the message.

Re-request AppData on UI load

The page loading is longer every time, including new windows and some error handling.

Store x-nextcloud-talk-hash in AppData and re-request on dirty hash

  1. Store x-nextcloud-talk-hash in AppData, including the dirty flag
  2. Request to restart or reload the page on a dirty hash
  3. On page/app load check if hash is dirty and re-request only when dirty.
@ShGKme ShGKme added bug Something isn't working 1. to develop labels May 22, 2023
@ShGKme ShGKme added this to the v0.7.0 milestone May 22, 2023
@ShGKme ShGKme self-assigned this May 22, 2023
@nickvergessen
Copy link
Member

Store x-nextcloud-talk-hash in AppData and re-request on dirty hash

This is what we should do. When a feature is enabled/disabled during the day you don't want to have people complaining that it still shows and doesn't work, just because they would need to manually reload/restart the app.

@ShGKme
Copy link
Contributor Author

ShGKme commented May 23, 2023

This is what we should do. When a feature is enabled/disabled during the day you don't want to have people complaining that it still shows and doesn't work, just because they would need to manually reload/restart the app.

I'm not sure, I understand you correct (or you understood me :D)

The main purpose of storing the hash is to not block app/window loading with requests each time, but only when it is known to be outdated.

It still requires manual update. Capabilities update without reload is not supported by Talk. Force reload may cause data loss (e.g. messages drafts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants