Commit da123102 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Fixed issue with soci indicator in load chat message contents

parent bb0e2fa9
......@@ -3136,20 +3136,20 @@ void MainDb::loadChatMessageContents (const shared_ptr<ChatMessage> &chatMessage
string name;
int size;
string path;
soci::indicator haveData;
*session << "SELECT name, size, path FROM chat_message_file_content"
" WHERE chat_message_content_id = :contentId",
soci::into(name, haveData), soci::into(size), soci::into(path), soci::use(contentId);
if( haveData == soci::i_ok) {
soci::into(name), soci::into(size), soci::into(path), soci::use(contentId);
if (session->got_data()) {
FileContent *fileContent = new FileContent();
fileContent->setFileName(name);
fileContent->setFileSize(size_t(size));
fileContent->setFilePath(path);
content = fileContent;
}else
} else {
content = new Content();
}
}
content->setContentType(contentType);
content->setBody(row.get<string>(3));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment