forked from mirrors/linphone-iphone
subscribe when creating a chatroom from db + fix creation of basic chat room from db
This commit is contained in:
parent
33c9f56f15
commit
a63b6c7601
2 changed files with 9 additions and 0 deletions
|
|
@ -107,12 +107,17 @@ ClientGroupChatRoom::ClientGroupChatRoom (
|
|||
RemoteConference(core, me->getAddress(), nullptr) {
|
||||
L_D();
|
||||
L_D_T(RemoteConference, dConference);
|
||||
|
||||
dConference->focus = make_shared<Participant>(peerAddress);
|
||||
dConference->conferenceAddress = peerAddress;
|
||||
dConference->subject = subject;
|
||||
dConference->participants = move(participants);
|
||||
|
||||
d->state = ChatRoom::State::Created;
|
||||
|
||||
getMe()->getPrivate()->setAdmin(me->isAdmin());
|
||||
|
||||
dConference->eventHandler->subscribe(getChatRoomId());
|
||||
}
|
||||
|
||||
shared_ptr<Core> ClientGroupChatRoom::getCore () const {
|
||||
|
|
|
|||
|
|
@ -235,6 +235,10 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
soci::use(static_cast<int>(chatRoom->getCapabilities())), soci::use(chatRoom->getSubject());
|
||||
|
||||
id = q->getLastInsertId();
|
||||
|
||||
if (!chatRoom->canHandleParticipants())
|
||||
return id;
|
||||
|
||||
shared_ptr<Participant> me = chatRoom->getMe();
|
||||
insertChatRoomParticipant(id, insertSipAddress(me->getAddress().asString()), me->isAdmin());
|
||||
for (const auto &participant : chatRoom->getParticipants())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue