aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-03-25 00:03:35 +0100
committerdec05eba <dec05eba@protonmail.com>2021-03-25 00:03:35 +0100
commitcf19ee36c326f89ebd1835a8dbdae07e56fb4043 (patch)
treea2499f8b104fcac724b1ffdd5a75991fb53f8964 /src/plugins
parent5756acdbf1a2679db8db91d873f57eeb2387c32f (diff)
4chan: fix crash when posting a reply
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Youtube.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 76f98e2..99227d5 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -712,12 +712,13 @@ namespace QuickMedia {
if(!author_text)
return nullptr;
- std::string title = author_text.value();
+ std::string author = author_text.value();
std::optional<std::string> published_time_text = yt_json_get_text(comment_renderer_json, "publishedTimeText");
if(published_time_text)
- title += " - " + published_time_text.value();
+ author += " - " + published_time_text.value();
- auto body_item = BodyItem::create(std::move(title));
+ auto body_item = BodyItem::create("");
+ body_item->set_author(std::move(author));
std::string description;
const Json::Value &author_is_channel_owner_json = comment_renderer_json["authorIsChannelOwner"];