small fix
This commit is contained in:
parent
65cffef560
commit
06a30e0458
@ -15,24 +15,33 @@ namespace demonware
|
|||||||
{
|
{
|
||||||
auto motd_content = utils::http::get_data("https://h1.gg/data/motd.json");
|
auto motd_content = utils::http::get_data("https://h1.gg/data/motd.json");
|
||||||
auto motd = new bdMarketingMessage;
|
auto motd = new bdMarketingMessage;
|
||||||
|
if (motd_content.has_value())
|
||||||
|
{
|
||||||
motd->m_messageID = 1;
|
motd->m_messageID = 1;
|
||||||
motd->m_languageCode = "en-US";
|
motd->m_languageCode = "en-US";
|
||||||
motd->m_content = motd_content.value().buffer.data();
|
motd->m_content = motd_content.value().buffer.data();
|
||||||
motd->m_metadata = "{}";
|
motd->m_metadata = "{}";
|
||||||
|
}
|
||||||
|
|
||||||
auto featured_content = utils::http::get_data("https://h1.gg/data/featured.json");
|
auto featured_content = utils::http::get_data("https://h1.gg/data/featured.json");
|
||||||
auto featured = new bdMarketingMessage;
|
auto featured = new bdMarketingMessage;
|
||||||
|
if (featured_content.has_value())
|
||||||
|
{
|
||||||
featured->m_messageID = 2;
|
featured->m_messageID = 2;
|
||||||
featured->m_languageCode = "en-US";
|
featured->m_languageCode = "en-US";
|
||||||
featured->m_content = featured_content.value().buffer.data();
|
featured->m_content = featured_content.value().buffer.data();
|
||||||
featured->m_metadata = "{}";
|
featured->m_metadata = "{}";
|
||||||
|
}
|
||||||
|
|
||||||
auto featured2_content = utils::http::get_data("https://h1.gg/data/featured2.json");
|
auto featured2_content = utils::http::get_data("https://h1.gg/data/featured2.json");
|
||||||
auto featured2 = new bdMarketingMessage;
|
auto featured2 = new bdMarketingMessage;
|
||||||
|
if (featured2_content.has_value())
|
||||||
|
{
|
||||||
featured2->m_messageID = 3;
|
featured2->m_messageID = 3;
|
||||||
featured2->m_languageCode = "en-US";
|
featured2->m_languageCode = "en-US";
|
||||||
featured2->m_content = featured2_content.value().buffer.data();
|
featured2->m_content = featured2_content.value().buffer.data();
|
||||||
featured2->m_metadata = "{}";
|
featured2->m_metadata = "{}";
|
||||||
|
}
|
||||||
|
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
reply->add(motd);
|
reply->add(motd);
|
||||||
|
Loading…
Reference in New Issue
Block a user