mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
feat(MainDb): deal with participants removed
This commit is contained in:
parent
9a8181ee31
commit
cf7aaf8b6c
2 changed files with 11 additions and 1 deletions
|
|
@ -57,6 +57,8 @@ private:
|
|||
long long selectChatRoomId (long long peerSipAddressId, long long localSipAddressId) const;
|
||||
long long selectChatRoomId (const ChatRoomId &chatRoomId) const;
|
||||
|
||||
void deleteChatRoomParticipant (long long chatRoomId, long long participantSipAddressId);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Events API.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -303,6 +303,13 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
return selectChatRoomId(peerSipAddressId, localSipAddressId);
|
||||
}
|
||||
|
||||
void MainDbPrivate::deleteChatRoomParticipant (long long chatRoomId, long long participantSipAddressId) {
|
||||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||
*session << "DELETE FROM chat_room_participant"
|
||||
" WHERE chat_room_id = :chatRoomId AND participant_sip_address_id = :participantSipAddressId",
|
||||
soci::use(chatRoomId), soci::use(participantSipAddressId);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<EventLog> MainDbPrivate::selectGenericConferenceEvent (
|
||||
|
|
@ -695,7 +702,8 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
break;
|
||||
|
||||
case EventLog::Type::ConferenceParticipantRemoved:
|
||||
// TODO: Deal with remove.
|
||||
deleteChatRoomParticipant(chatRoomId, participantAddressId);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue