mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
BUGFIX: broken like expansion
This commit is contained in:
@ -5,12 +5,6 @@ class BasicUserSerializer < ApplicationSerializer
|
||||
SiteSetting.enable_names?
|
||||
end
|
||||
|
||||
# so weird we send a hash in here sometimes and an object others
|
||||
def include_uploaded_avatar_id?
|
||||
SiteSetting.allow_uploaded_avatars? &&
|
||||
(Hash === object ? user[:uploaded_avatar_id] : object.uploaded_avatar_id)
|
||||
end
|
||||
|
||||
def avatar_template
|
||||
if Hash === object
|
||||
User.avatar_template(user[:username], user[:uploaded_avatar_id])
|
||||
|
Reference in New Issue
Block a user