From 76c71824974780fdabae0d80f95649209fb19459 Mon Sep 17 00:00:00 2001 From: Ryan Hammett Date: Mon, 1 Feb 2016 15:47:35 -0500 Subject: [PATCH] Simplified the logic for illust_id --- slack-pixiv/commands/pixiv.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/slack-pixiv/commands/pixiv.rb b/slack-pixiv/commands/pixiv.rb index 29e47ae..c72844d 100644 --- a/slack-pixiv/commands/pixiv.rb +++ b/slack-pixiv/commands/pixiv.rb @@ -13,11 +13,10 @@ module SlackMathbot # Create iOS Illustration URL # ios_url = "pixiv://illusts/" + pixiv_url.split("illust_id=")[-1] - illust_url = pixiv_url.split("illust_id=")[-1] - puts illust_url - ios_url = "pixiv://illusts/" + illust_url.slice(/^[0-9]+$/) + ios_url = "pixiv://illusts/" + pixiv_url.slice(/^[0-9]+$/) puts ios_url + # TODO: Create iOS Member URL, must find correct URL scheme ios_mem_url = "pixiv://member/" + pixiv_url.split("?id=")[-1] puts ios_mem_url