Merge branch 'mrf-steal-emoji-extname' into 'develop'
MRF.StealEmojiPolicy: Properly add fallback extension to filenames missing one See merge request pleroma/pleroma!4029
This commit is contained in:
commit
c29430b018
3 changed files with 31 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do
|
|||
|> Path.basename()
|
||||
|> Path.extname()
|
||||
|
||||
file_path = Path.join(emoji_dir_path, shortcode <> (extension || ".png"))
|
||||
extension = if extension == "", do: ".png", else: extension
|
||||
|
||||
file_path = Path.join(emoji_dir_path, shortcode <> extension)
|
||||
|
||||
case File.write(file_path, response.body) do
|
||||
:ok ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue