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

Updated project version in CmakeLists & fixed merge issue

parent 8f448c3f
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
############################################################################ ############################################################################
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.1)
project(linphone VERSION 4.4.0 LANGUAGES C CXX) project(linphone VERSION 4.5.0 LANGUAGES C CXX)
set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}) set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
......
...@@ -1760,16 +1760,6 @@ void MainDbPrivate::importLegacyHistory (DbSession &inDbSession) { ...@@ -1760,16 +1760,6 @@ void MainDbPrivate::importLegacyHistory (DbSession &inDbSession) {
insertContent(eventId, *content); insertContent(eventId, *content);
insertChatRoomParticipant(chatRoomId, remoteSipAddressId, false); insertChatRoomParticipant(chatRoomId, remoteSipAddressId, false);
insertChatMessageParticipant(eventId, remoteSipAddressId, state, std::time(nullptr)); insertChatMessageParticipant(eventId, remoteSipAddressId, state, std::time(nullptr));
// Set last_message_id to the last timed message for this chat room
*session << "UPDATE chat_room SET last_message_id = "
"(SELECT conference_event.event_id "//Select the event that match max time and chat room
"FROM conference_event, conference_chat_message_event,"
"(SELECT max(time) as t "// Get Max Time for the chat room
"FROM conference_event, conference_chat_message_event "
"WHERE conference_event.event_id=conference_chat_message_event.event_id AND conference_event.chat_room_id=:1)"
"WHERE conference_chat_message_event.time=t AND conference_chat_message_event.event_id=conference_event.event_id AND conference_event.chat_room_id=:1 "
"ORDER BY conference_event.event_id DESC LIMIT 1) "// Ensure to have only one event and the last id for the matching time
"WHERE id = :1 ", soci::use(chatRoomId);// Used to not get Empty chatroom
} }
// Set last_message_id to the last timed message for all chat room // Set last_message_id to the last timed message for all chat room
*dbSession.getBackendSession() << "UPDATE chat_room SET last_message_id = " *dbSession.getBackendSession() << "UPDATE chat_room SET last_message_id = "
......
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