diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index 508853d53..c34281ad4 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -99,15 +99,16 @@ RemoteConference(core, me, nullptr) { ClientGroupChatRoom::ClientGroupChatRoom ( const shared_ptr &core, - const IdentityAddress &peerAddress, + const ChatRoomId &chatRoomId, shared_ptr &me, const string &subject, list> &&participants, unsigned int lastNotifyId -) : ChatRoom(*new ClientGroupChatRoomPrivate, core, ChatRoomId(peerAddress, me->getAddress())), +) : ChatRoom(*new ClientGroupChatRoomPrivate, core, chatRoomId), RemoteConference(core, me->getAddress(), nullptr) { L_D_T(RemoteConference, dConference); + const IdentityAddress &peerAddress = chatRoomId.getPeerAddress(); dConference->focus = make_shared(peerAddress); dConference->conferenceAddress = peerAddress; dConference->subject = subject; diff --git a/src/chat/chat-room/client-group-chat-room.h b/src/chat/chat-room/client-group-chat-room.h index 8513633ea..2734772ea 100644 --- a/src/chat/chat-room/client-group-chat-room.h +++ b/src/chat/chat-room/client-group-chat-room.h @@ -41,7 +41,7 @@ public: ClientGroupChatRoom ( const std::shared_ptr &core, - const IdentityAddress &peerAddress, + const ChatRoomId &chatRoomId, std::shared_ptr &me, const std::string &subject, std::list> &&participants, diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 7c0a3abc0..f5157904a 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -191,7 +191,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), soci::session *session = dbSession.getBackendSession(); *session << "DELETE FROM chat_message_content WHERE event_id=:eventId", soci::use(eventId); - + //TODO: remove file content if exists //*session << "DELETE FROM chat_message_file_content WHERE chat_message_content_id=:messageContentId", soci::use(messageContentId); @@ -1924,7 +1924,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), } chatRoom = make_shared( core, - chatRoomId.getPeerAddress(), + chatRoomId, me, subject, move(participants),