Make an HttpRequest optional when rendering avatars or fetching URLs.
Review Request #10515 — Created April 4, 2019 and submitted — Latest diff uploaded
Avatar rendering and URL fetching currently takes a request, but this
prevents avatars from being used if rendering outside HTTP requests or
in places where the request is not available (such as in form widgets).This change makes these arguments optional. Avatar implementations must
take care to respect this, checking if a request isNone
before
accessing it, and falling back in some manner if needed.
Unit tests pass.
Tested manually (with some changes in Review Board) and verified that
different avatars rendered without having a request present.