Can't install emoji packs generated using `gen-pack`
Summary:
When I generate an emoji pack using pleroma_ctl emoji gen-pack
and then try to install it using pleroma_ctl emoji get-packs
, the install fails.
Steps to reproduce:
$ sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl emoji gen-pack https://moremoji.allezsoyez.com/zip/moremoji-prideflags-png.zip"
Pack name [moremoji-prideflags-png]: prideflags
License: CC-BY 4.0
Homepage: https://moremoji.allezsoyez.com/
Description: LGBTQ+ and poly pride flags
Save file list to [prideflags.json]:
Emoji file extensions (separated with spaces) [.png .gif]:
Downloading the pack and generating SHA256
SHA256 is C0A45BBCF0D2CBBDC9197F4C68CC46EB2043B828701108703F79A5B88CD1EB53
prideflags.json has been created and contains the list of all found emojis in the pack.
Please review the files in the remove those not needed.
index.json file has been update with the prideflags pack
$ sudo su pleroma -s $SHELL -lc "./bin/pleroma_ctl emoji get-packs -m /opt/pleroma/index.json prideflags"
Downloading prideflags from https://moremoji.allezsoyez.com/zip/moremoji-prideflags-png.zip
SHA256 of prideflags source file is OK
Fetching the file list for prideflags from /opt/pleroma/prideflags.json
** (CaseClauseError) no case clause matching: []
/builds/pleroma/pleroma/deps/hackney/src/hackney_url.erl:224: :hackney_url.parse_netloc/2
/builds/pleroma/pleroma/deps/hackney/src/hackney.erl:349: :hackney.request/5
lib/tesla/adapter/hackney.ex:70: Tesla.Adapter.Hackney.request/5
lib/tesla/adapter/hackney.ex:32: Tesla.Adapter.Hackney.call/2
lib/tesla/middleware/follow_redirects.ex:45: Tesla.Middleware.FollowRedirects.redirect/3
lib/tesla.ex:298: Tesla.execute!/3
lib/mix/tasks/pleroma/emoji.ex:138: anonymous fn/4 in Mix.Tasks.Pleroma.Emoji.run/1
(elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
I investigated a little, and my suspicion is that the file list location /opt/pleroma/prideflags.json
is expected to be a URL and gets passed to Tesla/hackney, which then fail to parse it because it's not a URL.