mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(MainDb): insert addresses correctly
This commit is contained in:
parent
8274b3d157
commit
88dbfba40b
1 changed files with 6 additions and 4 deletions
|
|
@ -213,8 +213,8 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||
|
||||
const ChatRoomId &chatRoomId = chatRoom->getChatRoomId();
|
||||
long long peerSipAddressId = selectSipAddressId(chatRoomId.getPeerAddress().asString());
|
||||
long long localSipAddressId = selectSipAddressId(chatRoomId.getLocalAddress().asString());
|
||||
long long peerSipAddressId = insertSipAddress(chatRoomId.getPeerAddress().asString());
|
||||
long long localSipAddressId = insertSipAddress(chatRoomId.getLocalAddress().asString());
|
||||
|
||||
long long id = selectChatRoomId(peerSipAddressId, localSipAddressId);
|
||||
if (id >= 0) {
|
||||
|
|
@ -236,7 +236,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
|
||||
id = q->getLastInsertId();
|
||||
for (const auto &participant : chatRoom->getParticipants())
|
||||
insertChatRoomParticipant(id, selectSipAddressId(participant->getAddress().asString()), participant->isAdmin());
|
||||
insertChatRoomParticipant(id, insertSipAddress(participant->getAddress().asString()), participant->isAdmin());
|
||||
|
||||
return id;
|
||||
}
|
||||
|
|
@ -1552,8 +1552,10 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
capabilities & static_cast<int>(ChatRoom::Capabilities::RealTimeText)
|
||||
);
|
||||
chatRoom->setSubject(subject);
|
||||
} else if (capabilities & static_cast<int>(ChatRoom::Capabilities::Conference))
|
||||
} else if (capabilities & static_cast<int>(ChatRoom::Capabilities::Conference)) {
|
||||
|
||||
chatRoom = make_shared<ClientGroupChatRoom>(core, chatRoomId, subject);
|
||||
}
|
||||
|
||||
if (!chatRoom)
|
||||
continue; // Not fetched.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue