Commit b8b82f7f authored by Benjamin REIS's avatar Benjamin REIS

keep fixing fetch of chat room

parent f04c4a40
...@@ -99,15 +99,16 @@ RemoteConference(core, me, nullptr) { ...@@ -99,15 +99,16 @@ RemoteConference(core, me, nullptr) {
ClientGroupChatRoom::ClientGroupChatRoom ( ClientGroupChatRoom::ClientGroupChatRoom (
const shared_ptr<Core> &core, const shared_ptr<Core> &core,
const IdentityAddress &peerAddress, const ChatRoomId &chatRoomId,
shared_ptr<Participant> &me, shared_ptr<Participant> &me,
const string &subject, const string &subject,
list<shared_ptr<Participant>> &&participants, list<shared_ptr<Participant>> &&participants,
unsigned int lastNotifyId unsigned int lastNotifyId
) : ChatRoom(*new ClientGroupChatRoomPrivate, core, ChatRoomId(peerAddress, me->getAddress())), ) : ChatRoom(*new ClientGroupChatRoomPrivate, core, chatRoomId),
RemoteConference(core, me->getAddress(), nullptr) { RemoteConference(core, me->getAddress(), nullptr) {
L_D_T(RemoteConference, dConference); L_D_T(RemoteConference, dConference);
const IdentityAddress &peerAddress = chatRoomId.getPeerAddress();
dConference->focus = make_shared<Participant>(peerAddress); dConference->focus = make_shared<Participant>(peerAddress);
dConference->conferenceAddress = peerAddress; dConference->conferenceAddress = peerAddress;
dConference->subject = subject; dConference->subject = subject;
......
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
ClientGroupChatRoom ( ClientGroupChatRoom (
const std::shared_ptr<Core> &core, const std::shared_ptr<Core> &core,
const IdentityAddress &peerAddress, const ChatRoomId &chatRoomId,
std::shared_ptr<Participant> &me, std::shared_ptr<Participant> &me,
const std::string &subject, const std::string &subject,
std::list<std::shared_ptr<Participant>> &&participants, std::list<std::shared_ptr<Participant>> &&participants,
......
...@@ -191,7 +191,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate), ...@@ -191,7 +191,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
soci::session *session = dbSession.getBackendSession<soci::session>(); soci::session *session = dbSession.getBackendSession<soci::session>();
*session << "DELETE FROM chat_message_content WHERE event_id=:eventId", soci::use(eventId); *session << "DELETE FROM chat_message_content WHERE event_id=:eventId", soci::use(eventId);
//TODO: remove file content if exists //TODO: remove file content if exists
//*session << "DELETE FROM chat_message_file_content WHERE chat_message_content_id=:messageContentId", soci::use(messageContentId); //*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> &core) : AbstractDb(*new MainDbPrivate), ...@@ -1924,7 +1924,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
} }
chatRoom = make_shared<ClientGroupChatRoom>( chatRoom = make_shared<ClientGroupChatRoom>(
core, core,
chatRoomId.getPeerAddress(), chatRoomId,
me, me,
subject, subject,
move(participants), move(participants),
......
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