From 05abaf1916d4d0f1e9145c4311405fc53af280bc Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 25 Mar 2020 02:20:56 +0300 Subject: [PATCH] Fix link for downloading emoji pack to instance --- src/views/emojiPacks/components/EmojiPack.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index 0eaf70b7..d31fcf8a 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -92,7 +92,7 @@

- + {{ isDesktop ? $t('emoji.downloadSharedPack') : $t('emoji.downloadSharedPackMobile') }}
@@ -209,10 +209,11 @@ export default { } }, methods: { - downloadFromInstance() { + downloadFromInstance(url) { + const instanceAddress = `${new URL(url).protocol}//${new URL(url).hostname}` this.$store.dispatch( 'DownloadFrom', - { instanceAddress: this.host, packName: this.name, as: this.downloadSharedAs } + { instanceAddress, packName: this.name, as: this.downloadSharedAs } ).then(() => this.$store.dispatch('ReloadEmoji')) .then(() => this.$store.dispatch('SetLocalEmojiPacks')) },