From f69dfab9c4ff3f53121537a5004b335f1e2a330d Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> Date: Tue, 22 Oct 2019 15:04:50 -0400 Subject: [PATCH] conference: do not resend vcard Do not resend vCards from client hosting conference. Change-Id: I7d1c8932a36ab793b1c29bbe49541e89aaf90194 --- src/manager.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/manager.cpp b/src/manager.cpp index 0625ad879c..c47e1641d3 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -1903,7 +1903,17 @@ Manager::incomingMessage(const std::string& callID, } JAMI_DBG("Is a conference, send incoming message to everyone"); - pimpl_->sendTextMessageToConference(*conf, messages, from); + //filter out vcards messages as they could be resent by master as its own vcard + // TODO. Implement a protocol to handle vcard messages + bool sendToOtherParicipants = true; + for (auto& message : messages) { + if (message.first.find("x-ring/ring.profile.vcard") != std::string::npos) { + sendToOtherParicipants = false; + } + } + if (sendToOtherParicipants) { + pimpl_->sendTextMessageToConference(*conf, messages, from); + } // in case of a conference we must notify client using conference id emitSignal<DRing::CallSignal::IncomingMessage>(conf->getConfID(), from, messages); -- GitLab