[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated setting
Closes #1973 (closed)
Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated (having local: true
and/or remote: true
contents under profiles
key).
Made Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)
demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
The issue was caused by calling AccountView.render("show.json", _)
without :for
option which was previously interpreted as for: nil
and was mistreated as a request to render for an anonymous user (which was denied by :restrict_unauthenticated
setting).
Edited by Ivan Tashkinov