From b20d9e4f87a708f75064870006237a6e1d15e265 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 17 Apr 2018 22:30:49 +0200 Subject: [PATCH] don't show success message on error --- BeezleBot/BeezleBot.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BeezleBot/BeezleBot.cpp b/BeezleBot/BeezleBot.cpp index 257581c..352f90b 100644 --- a/BeezleBot/BeezleBot.cpp +++ b/BeezleBot/BeezleBot.cpp @@ -59,6 +59,11 @@ int main(int argc, char **argv) try { wiki.appendToPage("beezletest", wikiMessage.str()); + + std::ostringstream pageUrl; + pageUrl << settings.wikiUrl << "/doku.php?id=" << "beezletest"; + api.sendMessage(std::to_string(message.chat.id), + "Stored to wiki at " + pageUrl.str()); } catch (std::runtime_error &e) { @@ -67,11 +72,6 @@ int main(int argc, char **argv) api.getLogger().error(reply.str()); api.sendMessage(std::to_string(message.chat.id), reply.str()); } - - std::ostringstream pageUrl; - pageUrl << settings.wikiUrl << "/doku.php?id=" << "beezletest"; - api.sendMessage(std::to_string(message.chat.id), - "Stored to wiki at " + pageUrl.str()); } } });