twitter-v2-rs icon indicating copy to clipboard operation
twitter-v2-rs copied to clipboard

Allow empty string for profile image URL

Open Syfaro opened this issue 1 year ago • 1 comments

This is a bit of a weird issue and I'm not entirely sure this is the best way to solve it. Essentially, some users have a profile_image_url that's an empty string, not null, and that obviously can't be deserialized to a url::Url. This adds a custom function for deserializing that converts empty strings to None, and continues to parse non-empty strings to a url::Url. I've loaded tens of thousands of profiles with these changes and it seems to fix the issue.

Syfaro avatar Nov 28 '22 22:11 Syfaro