Skip to content
Snippets Groups Projects
Commit 304d6ad1 authored by Bob Mottram's avatar Bob Mottram
Browse files

Convert emoji images to png format

parent 666fd17e
No related branches found
No related tags found
No related merge requests found
......@@ -443,6 +443,17 @@ function pleroma_add_emoji {
return
fi
if [[ "$image_url" == *'.jpg' || "$image_url" == *'.jpeg' || "$image_url" == *'.gif' ]]; then
convert $image_filename $PLEROMA_DIR/custom_emoji/${shortcode}.png
if [ ! -f $PLEROMA_DIR/custom_emoji/${shortcode}.png ]; then
dialog --title $"Add Custom Emoji" \
--msgbox $"Unable to convert empji image to png format" 6 60
return
fi
image_extension='png'
image_filename=$PLEROMA_DIR/custom_emoji/${shortcode}.${image_extension}
fi
if ! grep -q "${shortcode}," $image_filename; then
echo "${shortcode}, ${image_filename}" >> $PLEROMA_DIR/config/emoji.txt
else
......@@ -682,6 +693,8 @@ function install_pleroma {
ONION_ONLY='no'
fi
apt-get -yq install wget imagemagick
# We need elixir 1.4+ here, so the debian repo package won't do
install_elixir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment