Commit c327a603 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Prevent adding the same address several times in the remote is composing list.

parent 96912185
......@@ -196,10 +196,13 @@ void ChatRoomPrivate::notifyChatMessageReceived (const shared_ptr<ChatMessage> &
void ChatRoomPrivate::notifyIsComposingReceived (const Address &remoteAddress, bool isComposing) {
L_Q();
if (isComposing)
remoteIsComposing.push_back(remoteAddress);
else
if (isComposing) {
auto it = find(remoteIsComposing.cbegin(), remoteIsComposing.cend(), remoteAddress);
if (it == remoteIsComposing.cend())
remoteIsComposing.push_back(remoteAddress);
} else {
remoteIsComposing.remove(remoteAddress);
}
LinphoneChatRoom *cr = getCChatRoom();
LinphoneAddress *lAddr = linphone_address_new(remoteAddress.asString().c_str());
......
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