diff --git a/CMakeLists.txt b/CMakeLists.txt index dd84396..989e54c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (expandurl-mastodon - VERSION 0.3.1 + VERSION 0.3.2 LANGUAGES CXX ) diff --git a/src/masto.cpp b/src/masto.cpp index 600f577..9b0b4b5 100644 --- a/src/masto.cpp +++ b/src/masto.cpp @@ -195,13 +195,24 @@ const std::uint_fast64_t Listener::get_parent_id(Easy::Notification ¬if) string answer; std::uint_fast16_t ret; + // Fetch full status + ret = _masto->get(API::v1::search, {{ "q", { notif.status().url() }}}, + answer); + if (ret > 0) + { + cerr << "ERROR: " << ret << + "Could not fetch status (in " << __FUNCTION__ << ")\n"; + return 0; + } + ret = _masto->get(API::v1::statuses_id, {{ "id", { std::to_string(notif.status().id()) }}}, answer); if (ret > 0) { - cerr << "ERROR: " << ret << " (in " << __FUNCTION__ << ")\n"; + cerr << "ERROR: " << ret << + "Could not get status (in " << __FUNCTION__ << ")\n"; return 0; } else