Commit 2014fc34 authored by Filipe Azevedo's avatar Filipe Azevedo Committed by Linus Jahn

Fix wrong media type being set when inserting messages in db

parent e25050d0
......@@ -186,7 +186,7 @@ void MessageDb::addMessage(const Message &msg)
record.setValue("id", ? " " :;
record.setValue("isSent", msg.isSent());
record.setValue("isDelivered", msg.isDelivered());
record.setValue("type", int(msg.type()));
record.setValue("type", int(msg.mediaType()));
record.setValue("edited", msg.isEdited());
record.setValue("isSpoiler", msg.isSpoiler());
record.setValue("spoilerHint", msg.spoilerHint());
......@@ -217,7 +217,7 @@ void MessageDb::removeMessage(const QString &id)
void MessageDb::updateMessage(const QString &id,
const std::function<void (Message &)> &updateMsg)
// load current roster item from db
// load current message item from db
QSqlDatabase db = QSqlDatabase::database(DB_CONNECTION);
QSqlQuery query(db);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment