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

Fix to re-download avatars and headers that failed to download #15477

Conversation

noellabo
Copy link
Contributor

@noellabo noellabo commented Jan 3, 2021

If the avatar and header download fails for a temporary reason, it will not be updated until the remote_url changes.

For this reason, the image was not updated when the remote account updated information other than the image or when the "REFRESH PROFILE" button was pressed on the moderation account page.

In this PR, if the download fails, it will be recorded in the "needs_download" flag so that it will be re-downloaded if necessary.

In addition to this, you may want to improve "tootctl accounts refresh" or re-download with a scheduled task.

@noellabo noellabo force-pushed the fix-avatar-and-header-needs-redownload branch from 4d68a3d to 7a5ae3d Compare January 3, 2021 13:27
@ClearlyClaire
Copy link
Contributor

Hm, I wonder if we need additional fields… shouldn't {attachment_name}_file_name be nil if the download failed?

@noellabo
Copy link
Contributor Author

noellabo commented Jan 8, 2021

Sure, it's better not to add fields.

Currently, it keeps old icons and headers if the download fails. If you set it to nil, it will be returned to missing.png. Which is the preferred behavior?

@ClearlyClaire
Copy link
Contributor

ah, good point!
I have a preference on returning missing.png rather than a stale image, but this is debatable.

Base automatically changed from master to main January 20, 2021 10:31
@ClearlyClaire
Copy link
Contributor

I would personally prefer if it set those values to nil instead of adding fields, but @Gargron might have a different opinion.

@Gargron
Copy link
Member

Gargron commented May 6, 2021

I think missing.png makes more sense than displaying stale image (user may not desire old avatar to be displayed anymore)

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 this pull request may close these issues.

None yet

3 participants