mirror of
https://gitlab.com/niansa/dpplogger.git
synced 2025-03-06 20:48:29 +01:00
Fixed storage of empty embeds
This commit is contained in:
parent
13b372714d
commit
8246efa358
1 changed files with 1 additions and 1 deletions
2
main.cpp
2
main.cpp
|
@ -377,7 +377,7 @@ protected:
|
|||
db << "INSERT INTO message_contents (message_id, is_initial, timestamp, content, embeds)"
|
||||
" VALUES (?, ?, ?, ?, ? );"
|
||||
<< data["id"].asString() << is_initial << std::to_string(time(nullptr)) << data["content"].asString()
|
||||
<< (embeds.isArray()?Json::writeString(Json::StreamWriterBuilder(), embeds):std::optional<std::string>());
|
||||
<< ((embeds.isArray()&&!embeds.empty())?Json::writeString(Json::StreamWriterBuilder(), embeds):std::optional<std::string>());
|
||||
}
|
||||
void insertMessageUpdate(const Json::Value& data, bool is_initial) {
|
||||
bool has_content = !data["content"].asString().empty() || data["embeds"].isArray();
|
||||
|
|
Loading…
Add table
Reference in a new issue