diff --git a/src/chat/chat-room/abstract-chat-room.h b/src/chat/chat-room/abstract-chat-room.h index 4de1c99d2..8a259466f 100644 --- a/src/chat/chat-room/abstract-chat-room.h +++ b/src/chat/chat-room/abstract-chat-room.h @@ -41,7 +41,6 @@ class LINPHONE_PUBLIC AbstractChatRoom : public Object, public CoreAccessor, pub friend class Core; friend class CorePrivate; friend class MainDb; - friend class MainDbPrivate; friend class ProxyChatRoomPrivate; public: diff --git a/src/chat/chat-room/client-group-chat-room-p.h b/src/chat/chat-room/client-group-chat-room-p.h index c3713e547..e617b517d 100644 --- a/src/chat/chat-room/client-group-chat-room-p.h +++ b/src/chat/chat-room/client-group-chat-room-p.h @@ -38,8 +38,6 @@ public: void setCallSessionListener (CallSessionListener *listener); void setChatRoomListener (ChatRoomListener *listener) { chatRoomListener = listener; } - unsigned int getLastNotifyId () const; - // ChatRoomListener void onChatRoomInsertRequested (const std::shared_ptr &chatRoom) override; void onChatRoomInsertInDatabaseRequested (const std::shared_ptr &chatRoom) override; diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index edbad78e1..f200a7f4f 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -103,12 +103,6 @@ void ClientGroupChatRoomPrivate::setCallSessionListener (CallSessionListener *li } } -unsigned int ClientGroupChatRoomPrivate::getLastNotifyId () const { - L_Q_T(RemoteConference, qConference); - - return qConference->getPrivate()->eventHandler->getLastNotify(); -} - // ----------------------------------------------------------------------------- void ClientGroupChatRoomPrivate::onChatRoomInsertRequested (const shared_ptr &chatRoom) { diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index ebad9d530..fa5e63b6a 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -24,7 +24,7 @@ #include "chat/chat-message/chat-message-p.h" #include "chat/chat-room/chat-room-p.h" -#include "chat/chat-room/client-group-chat-room-p.h" +#include "chat/chat-room/client-group-chat-room.h" #include "chat/chat-room/server-group-chat-room.h" #include "conference/participant-device.h" #include "conference/participant-p.h" @@ -333,23 +333,13 @@ long long MainDbPrivate::insertChatRoom (const shared_ptr &cha // Remove capabilities like `Proxy`. const int &capabilities = chatRoom->getCapabilities() & ~ChatRoom::CapabilitiesMask(ChatRoom::Capabilities::Proxy); - unsigned int lastNotifyId = 0; - if (!linphone_core_conference_server_enabled(chatRoom->getCore()->getCCore()) - && (chatRoom->getCapabilities() & ChatRoom::Capabilities::Conference) - ) - lastNotifyId = static_cast(chatRoom->getPrivate())->getLastNotifyId(); - const string &subject = chatRoom->getSubject(); const int &flags = chatRoom->hasBeenLeft(); *dbSession.getBackendSession() << "INSERT INTO chat_room (" - " peer_sip_address_id, local_sip_address_id, creation_time," - " last_update_time, capabilities, subject, flags, last_notify_id" - ") VALUES (" - " :peerSipAddressId, :localSipAddressId, :creationTime," - " :lastUpdateTime, :capabilities, :subject, :flags, :lastNotifyId" - ")", - soci::use(peerSipAddressId), soci::use(localSipAddressId), soci::use(creationTime), - soci::use(lastUpdateTime), soci::use(capabilities), soci::use(subject), soci::use(flags), soci::use(lastNotifyId); + " peer_sip_address_id, local_sip_address_id, creation_time, last_update_time, capabilities, subject, flags" + ") VALUES (:peerSipAddressId, :localSipAddressId, :creationTime, :lastUpdateTime, :capabilities, :subject, :flags)", + soci::use(peerSipAddressId), soci::use(localSipAddressId), soci::use(creationTime), soci::use(lastUpdateTime), + soci::use(capabilities), soci::use(subject), soci::use(flags); id = dbSession.getLastInsertId(); if (!chatRoom->canHandleParticipants())