Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[stable12] Fix own avatar not updated when display name is changed #8130
The avatar endpoint returns the avatar image or, if the user has no avatar, the display name. In that later case the avatar is generated on the browser based on the display name. The avatar endpoint response is cached, so when the display name changes and the avatar is got again the browser could use the cached value, in which case it would use the same display name as before and the avatar would not change.
When the avatar is an image the cache is invalidated with the use of the version parameter, which is increased when the image changes. When the avatar cache was first introduced only the image avatars were cached, but it was later changed to cache all avatar responses to limit the requests made to the server. Thus, now the cache of the display name is invalidated too by increasing the version of the avatar if the display name changes and there is no explicit avatar set.
In Nextcloud 13 and current master the avatar is always generated by the server, so these changes should not be needed in those versions.
How to test this:
@@ Coverage Diff @@ ## stable12 #8130 +/- ## ============================================== + Coverage 53.84% 53.85% +<.01% - Complexity 22761 22766 +5 ============================================== Files 1385 1385 Lines 87150 87159 +9 Branches 1331 1331 ============================================== + Hits 46926 46936 +10 + Misses 40224 40223 -1