diff --git a/miku/plugins/app_store.lua b/miku/plugins/app_store.lua
index b0c8593..a7c5df0 100644
--- a/miku/plugins/app_store.lua
+++ b/miku/plugins/app_store.lua
@@ -67,12 +67,6 @@ function app_store:send_appstore_data(data)
ratings = ""
end
-
- local header = ''..name..' v'..version..' von '..author..' ('..price..'):'
- local body = '\n'..description..'\nBenötigt mind. iOS '..min_ios_ver..'\nGröße: '..size..' MB\nErstveröffentlicht am '..release..game_center..category
- local footer = '\n'..avg_rating..ratings
- local text = header..body..footer
-
-- Picture
if data.screenshotUrls[1] and data.ipadScreenshotUrls[1] then
image_url = data.screenshotUrls[1]
@@ -84,7 +78,16 @@ function app_store:send_appstore_data(data)
image_url = nil
end
- return text, image_url
+ if image_url then
+ header = ''..name..' v'..version..' von '..author..' ('..price..'): '
+ else
+ header = ''..name..' v'..version..' von '..author..' ('..price..'):'
+ end
+ local body = '\n'..description..'\nBenötigt mind. iOS '..min_ios_ver..'\nGröße: '..size..' MB\nErstveröffentlicht am '..release..game_center..category
+ local footer = '\n'..avg_rating..ratings
+ local text = header..body..footer
+
+ return text
end
function app_store:action(msg, config, matches)
@@ -99,13 +102,9 @@ function app_store:action(msg, config, matches)
utilities.send_reply(msg, 'App nicht gefunden!', 'HTML')
return
else
- local output, image_url = app_store:send_appstore_data(data)
- utilities.send_reply(msg, output, 'HTML')
- if image_url then
- utilities.send_typing(msg.chat.id, 'upload_photo')
- utilities.send_photo(msg.chat.id, image_url, nil, msg.message_id)
- end
+ local output = app_store:send_appstore_data(data)
+ utilities.send_message(msg.chat.id, output, false, msg.message_id, 'HTML')
end
end
-return app_store
+return app_store
\ No newline at end of file