Commit d7be2afb authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ConferenceAddMOdel): check valid sip address in `addToConference`

parent c515eec4
...@@ -90,15 +90,17 @@ bool ConferenceHelperModel::ConferenceAddModel::addToConference (const QString & ...@@ -90,15 +90,17 @@ bool ConferenceHelperModel::ConferenceAddModel::addToConference (const QString &
if (mSipAddresses.contains(sipAddress)) if (mSipAddresses.contains(sipAddress))
return false; return false;
int row = rowCount(); shared_ptr<linphone::Address> address = CoreManager::getInstance()->getCore()->interpretUrl(
::Utils::appStringToCoreString(sipAddress)
);
if (!address || address->getUsername().empty())
return false;
int row = rowCount();
beginInsertRows(QModelIndex(), row, row); beginInsertRows(QModelIndex(), row, row);
qInfo() << QStringLiteral("Add sip address to conference: `%1`.").arg(sipAddress); qInfo() << QStringLiteral("Add sip address to conference: `%1`.").arg(sipAddress);
shared_ptr<linphone::Address> linphoneAddress = CoreManager::getInstance()->getCore()->interpretUrl( addToConferencePrivate(address);
::Utils::appStringToCoreString(sipAddress)
);
addToConferencePrivate(linphoneAddress);
endInsertRows(); endInsertRows();
......
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