diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp index 6b70da34d..aaecdf469 100644 --- a/src/chat/chat-room/chat-room.cpp +++ b/src/chat/chat-room/chat-room.cpp @@ -196,10 +196,13 @@ void ChatRoomPrivate::notifyChatMessageReceived (const shared_ptr & 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());