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

Doesn’t update my own avatar #3397

Closed
andersk opened this issue Mar 12, 2019 · 4 comments
Closed

Doesn’t update my own avatar #3397

andersk opened this issue Mar 12, 2019 · 4 comments
Labels
a-avatar Avatar URLs, caching, sizes, styles, etc. a-data-sync Zulip's event system, event queues, staleness/liveness a-redux

Comments

@andersk
Copy link
Member

andersk commented Mar 12, 2019

My mobile app never refetched my avatar after I created it on Gravatar. It still shows the autogenerated pattern in the bottom bar and the user list, although it shows the correct picture with my messages in the message list.

@borisyankov
Copy link
Contributor

Thanks for reporting this.
I did investigate the issue and luckily it was easy to determine its cause:
https://github.com/zulip/zulip-mobile/blob/master/src/users/usersReducers.js#L33

@borisyankov borisyankov self-assigned this Mar 12, 2019
@timabbott
Copy link
Member

This actually highlights something we should be doing as preparation for the Queue 2.0 project. Once we move to Queue 2.0, our data structures will no longer be automatically reset all the time by doing new /register requests. As a result, data tracking bugs like this (and another that Greg and I were talking about yesterday with topic editing), which previously might have auto-correct on the next /register might result in semi-permanent incorrect state.

So we should probably prioritize doing a full audit of all of the event types produced by the zulip backend and whether the mobile app is correctly updating its data structures. I think reading zerver/lib/events.py and/or static/js/server_events_dispatch.js is a good way to produce a list of things to audit.

@borisyankov
Copy link
Contributor

That is a good point. I have started the audit and will document anything missing in a new issue.

FYI: I am already working on the users updating code as that is the most important missing functionality for Queue 2.0

borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 14, 2019
Fixes #zulip#3397
Part of ...???
borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 15, 2019
Fixes #zulip#3397
Part of ...???
borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 15, 2019
Fixes #zulip#3397
Part of ...???
borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 15, 2019
Fixes #zulip#3397
Part of ...???
borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 16, 2019
Fixes #zulip#3397
Part of ...???
borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Mar 17, 2019
Fixes zulip#3397 Part of zulip#3408

Handles the three types of user data updates possible:
* full name
* avatar
* custom profile field

Extra care is taken not to mutate the state if not necessary.

This is done for two reasons:
 * currently editing values throught he web app causes two events,
   one of which is not necessary (maybe should be fixed)
 * this is likely the largest state, doing an extra `isEqual` can
   save copying all this data
@gnprice gnprice added the a-data-sync Zulip's event system, event queues, staleness/liveness label Aug 28, 2019
@gnprice gnprice added the a-avatar Avatar URLs, caching, sizes, styles, etc. label Nov 12, 2020
@chrisbobbe
Copy link
Contributor

chrisbobbe commented May 20, 2022

Closing as fixed in 7296551 / #4230.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-avatar Avatar URLs, caching, sizes, styles, etc. a-data-sync Zulip's event system, event queues, staleness/liveness a-redux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants