mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: letter avatars in quotes on subfolders installs are broken
This commit is contained in:
@@ -573,6 +573,7 @@ class User < ActiveRecord::Base
|
||||
# TODO it may be worth caching this in a distributed cache, should be benched
|
||||
if SiteSetting.external_system_avatars_enabled
|
||||
url = SiteSetting.external_system_avatars_url.dup
|
||||
url = "#{Discourse::base_uri}#{url}" unless url =~ /^https?:\/\//
|
||||
url.gsub! "{color}", letter_avatar_color(username.downcase)
|
||||
url.gsub! "{username}", username
|
||||
url.gsub! "{first_letter}", username[0].downcase
|
||||
|
||||
Reference in New Issue
Block a user