mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Fix emoji on enterprise.
static/ doesn't exist on enterprise, so we can't get the list from the files there. (imported from commit ce34a62478abf541feb013da4f970dac3c09d98a)
This commit is contained in:
@@ -53,6 +53,9 @@ echo $GITID > build_id
|
||||
echo $version > version
|
||||
mv update-prod-static.log ..
|
||||
|
||||
# We don't need duplicate copies of emoji with hashed paths, and they would break bugdown
|
||||
find prod-static/serve/third/gemoji/images/emoji/ -regex '.*\.[0-9a-f]+\.png' -delete
|
||||
|
||||
cd $TMPDIR
|
||||
|
||||
tar --append -f $TARBALL $prefix/prod-static $prefix/build_id $prefix/version
|
||||
|
||||
@@ -351,11 +351,17 @@ class Avatar(markdown.inlinepatterns.Pattern):
|
||||
img.set('alt', email_address)
|
||||
return img
|
||||
|
||||
if settings.ENTERPRISE:
|
||||
path_to_emoji = os.path.join(os.path.dirname(__file__), '..', '..', '..',
|
||||
'prod-static', 'serve', 'third', 'gemoji', 'images', 'emoji', '*.png')
|
||||
else:
|
||||
path_to_emoji = os.path.join(os.path.dirname(__file__), '..', '..', '..',
|
||||
# This should be the root
|
||||
'static', 'third', 'gemoji', 'images', 'emoji', '*.png')
|
||||
|
||||
emoji_list = [os.path.splitext(os.path.basename(fn))[0] for fn in glob.glob(path_to_emoji)]
|
||||
|
||||
|
||||
def make_emoji(emoji_name, src, display_string):
|
||||
elt = markdown.util.etree.Element('img')
|
||||
elt.set('src', src)
|
||||
|
||||
Reference in New Issue
Block a user