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

Change emoji resolution if not converting format

parent 0d1368fd
No related branches found
No related tags found
No related merge requests found
......@@ -387,6 +387,8 @@ function pleroma_disable_registrations {
}
function pleroma_add_emoji {
emoji_resolution='64x64'
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
......@@ -444,7 +446,7 @@ function pleroma_add_emoji {
fi
if [[ "$image_url" == *'.jpg' || "$image_url" == *'.jpeg' || "$image_url" == *'.gif' ]]; then
convert $image_filename -resize 64x64 $PLEROMA_DIR/custom_emoji/${shortcode}.png
convert $image_filename -resize $emoji_resolution $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
......@@ -456,6 +458,8 @@ function pleroma_add_emoji {
image_extension='png'
image_filename=$PLEROMA_DIR/custom_emoji/${shortcode}.${image_extension}
else
convert $image_filename -resize $emoji_resolution $image_filename
fi
if ! grep -q "${shortcode}," $image_filename; then
......
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