mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 03:09:23 +00:00
feat(core): add findChatRooms impl
This commit is contained in:
parent
b133c5899f
commit
46a194d5b3
1 changed files with 12 additions and 2 deletions
|
|
@ -170,8 +170,18 @@ shared_ptr<ChatRoom> Core::findChatRoom (const ChatRoomId &chatRoomId) const {
|
|||
}
|
||||
|
||||
list<shared_ptr<ChatRoom>> Core::findChatRooms (const IdentityAddress &peerAddress) const {
|
||||
// TODO: DEV GROUP CHAT.
|
||||
return list<shared_ptr<ChatRoom>>();
|
||||
L_D();
|
||||
|
||||
// TODO: Improve performance if necessary.
|
||||
list<shared_ptr<ChatRoom>> output;
|
||||
copy_if(
|
||||
d->chatRooms.begin(), d->chatRooms.end(),
|
||||
back_inserter(output), [&peerAddress](const shared_ptr<ChatRoom> &chatRoom) {
|
||||
return chatRoom->getPeerAddress() == peerAddress;
|
||||
}
|
||||
);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
shared_ptr<ChatRoom> Core::createClientGroupChatRoom (const string &subject) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue