From e618966f2942a204b4a01d5a6c21859387535e87 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sat, 31 Mar 2018 13:37:51 +0200 Subject: [PATCH] changed config to DokuWiki base url --- BeezleBot/BeezleBot.cpp | 8 ++++++-- beezle.conf | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BeezleBot/BeezleBot.cpp b/BeezleBot/BeezleBot.cpp index aa1ea07..482d8dd 100644 --- a/BeezleBot/BeezleBot.cpp +++ b/BeezleBot/BeezleBot.cpp @@ -11,7 +11,8 @@ int main(int argc, char **argv) { Settings settings(argc, argv); - DokuWiki wiki(settings.wikiUrl, settings.wikiUser, settings.wikiPassword); + DokuWiki wiki(settings.wikiUrl + "/lib/exe/xmlrpc.php", + settings.wikiUser, settings.wikiPassword); tgbot::LongPollBot bot(settings.telegramToken); bot.callback([&wiki, &settings](const tgbot::types::Message message, @@ -46,7 +47,10 @@ int main(int argc, char **argv) api.sendMessage(std::to_string(message.chat.id), reply.str()); } - api.sendMessage(std::to_string(message.chat.id), "Stored to wiki"); + std::ostringstream pageUrl; + pageUrl << settings.wikiUrl << "/doku.php?id=" << "beezletest"; + api.sendMessage(std::to_string(message.chat.id), + "Stored to wiki at " + pageUrl.str()); } } }); diff --git a/beezle.conf b/beezle.conf index 5ec7fbe..66a628c 100644 --- a/beezle.conf +++ b/beezle.conf @@ -3,7 +3,7 @@ token = 123456789:ABCDEFG1234567HIJKLMN8901234abcdefg users = my_telegram_user [DokuWiki] -url = https://my.webserver.url/dokuwiki/lib/exe/xmlrpc.php +url = https://my.webserver.url/dokuwiki username = wiki_username password = wiki_password