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

Fixed issue with soci indicator in load chat message contents

parent c001a62e
...@@ -3136,19 +3136,19 @@ void MainDb::loadChatMessageContents (const shared_ptr<ChatMessage> &chatMessage ...@@ -3136,19 +3136,19 @@ void MainDb::loadChatMessageContents (const shared_ptr<ChatMessage> &chatMessage
string name; string name;
int size; int size;
string path; string path;
soci::indicator haveData;
*session << "SELECT name, size, path FROM chat_message_file_content" *session << "SELECT name, size, path FROM chat_message_file_content"
" WHERE chat_message_content_id = :contentId", " WHERE chat_message_content_id = :contentId",
soci::into(name, haveData), soci::into(size), soci::into(path), soci::use(contentId); soci::into(name), soci::into(size), soci::into(path), soci::use(contentId);
if( haveData == soci::i_ok) { if (session->got_data()) {
FileContent *fileContent = new FileContent(); FileContent *fileContent = new FileContent();
fileContent->setFileName(name); fileContent->setFileName(name);
fileContent->setFileSize(size_t(size)); fileContent->setFileSize(size_t(size));
fileContent->setFilePath(path); fileContent->setFilePath(path);
content = fileContent; content = fileContent;
}else } else {
content = new Content(); content = new Content();
}
} }
content->setContentType(contentType); content->setContentType(contentType);
......
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