summaryrefslogtreecommitdiff
path: root/discord/store.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-12-22 22:32:05 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2020-12-22 22:32:05 -0500
commitcb18543c503320cf9d2132b0077625acb0e78e51 (patch)
tree0fc86a50ede211967658f619e4d5513d8ae033e2 /discord/store.cpp
parent2e2ed5fc8f5192f082603f108fbe9a1fdaf39707 (diff)
downloadabaddon-portaudio-cb18543c503320cf9d2132b0077625acb0e78e51.tar.gz
abaddon-portaudio-cb18543c503320cf9d2132b0077625acb0e78e51.zip
show RECIPIENT_ADD, RECIPIENT_REMOVE messages
Diffstat (limited to 'discord/store.cpp')
-rw-r--r--discord/store.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/discord/store.cpp b/discord/store.cpp
index 6024046..ef23eca 100644
--- a/discord/store.cpp
+++ b/discord/store.cpp
@@ -189,16 +189,9 @@ void Store::SetMessage(Snowflake id, const Message &message) {
Bind(m_set_msg_stmt, 7, message.EditedTimestamp);
Bind(m_set_msg_stmt, 8, message.IsTTS);
Bind(m_set_msg_stmt, 9, message.DoesMentionEveryone);
- Bind(m_set_msg_stmt, 10, "[]"s); // mentions, a const char* literal will call the bool overload instead of std::string
- {
- std::string tmp;
- tmp = nlohmann::json(message.Attachments).dump();
- Bind(m_set_msg_stmt, 11, tmp);
- }
- {
- std::string tmp = nlohmann::json(message.Embeds).dump();
- Bind(m_set_msg_stmt, 12, tmp);
- }
+ Bind(m_set_msg_stmt, 10, nlohmann::json(message.Mentions).dump());
+ Bind(m_set_msg_stmt, 11, nlohmann::json(message.Attachments).dump());
+ Bind(m_set_msg_stmt, 12, nlohmann::json(message.Embeds).dump());
Bind(m_set_msg_stmt, 13, message.IsPinned);
Bind(m_set_msg_stmt, 14, message.WebhookID);
Bind(m_set_msg_stmt, 15, static_cast<uint64_t>(message.Type));