emoji in webroot
This commit is contained in:
parent
707d4a1c72
commit
518540149d
|
@ -433,11 +433,11 @@ function pleroma_add_emoji {
|
|||
image_extension='gif'
|
||||
fi
|
||||
|
||||
if [ ! -d $PLEROMA_DIR/custom_emoji ]; then
|
||||
mkdir -p $PLEROMA_DIR/custom_emoji
|
||||
if [ ! -d $PLEROMA_DIR/priv/static/emoji ]; then
|
||||
mkdir -p $PLEROMA_DIR/priv/static/emoji
|
||||
fi
|
||||
|
||||
image_filename=$PLEROMA_DIR/custom_emoji/${shortcode}.${image_extension}
|
||||
image_filename=$PLEROMA_DIR/priv/static/emoji/${shortcode}.${image_extension}
|
||||
wget "$image_url" -O $image_filename
|
||||
if [ ! -f $image_filename ]; then
|
||||
dialog --title $"Add Custom Emoji" \
|
||||
|
@ -446,8 +446,8 @@ function pleroma_add_emoji {
|
|||
fi
|
||||
|
||||
if [[ "$image_url" == *'.jpg' || "$image_url" == *'.jpeg' || "$image_url" == *'.gif' ]]; then
|
||||
convert $image_filename -resize $emoji_resolution $PLEROMA_DIR/custom_emoji/${shortcode}.png
|
||||
if [ ! -f $PLEROMA_DIR/custom_emoji/${shortcode}.png ]; then
|
||||
convert $image_filename -resize $emoji_resolution $PLEROMA_DIR/priv/static/emoji/${shortcode}.png
|
||||
if [ ! -f $PLEROMA_DIR/priv/static/emoji/${shortcode}.png ]; then
|
||||
dialog --title $"Add Custom Emoji" \
|
||||
--msgbox $"Unable to convert empji image to png format" 6 60
|
||||
return
|
||||
|
@ -457,7 +457,7 @@ function pleroma_add_emoji {
|
|||
rm $image_filename
|
||||
|
||||
image_extension='png'
|
||||
image_filename=$PLEROMA_DIR/custom_emoji/${shortcode}.${image_extension}
|
||||
image_filename=$PLEROMA_DIR/priv/static/emoji/${shortcode}.${image_extension}
|
||||
else
|
||||
convert $image_filename -resize $emoji_resolution $image_filename
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue