Commit 0f32462e authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Revert "[sms] Restore compatibility with current Android release"

R
A new Android app was released

This reverts commit 42668340.
parent 18031e97
......@@ -59,15 +59,26 @@ bool SmsPlugin::receivePacket(const NetworkPacket& np)
void SmsPlugin::sendSms(const QDBusVariant& addresses, const QString& messageBody, const qint64 subID)
{
Q_UNUSED(subID)
const QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
if (addressList.isEmpty()) {
qCDebug(KDECONNECT_PLUGIN_SMS) << "Empty address list";
return;
QVariantList addressMapList;
for (const ConversationAddress address : addressList) {
QVariantMap addressMap({{QStringLiteral("address"), address.address()}});
addressMapList.append(addressMap);
qDebug() <<address.address();
}
sendSms(addressList.first().address(), messageBody);
QVariantMap packetMap({
{QStringLiteral("sendSms"), true},
{QStringLiteral("addresses"), addressMapList},
{QStringLiteral("messageBody"), messageBody}
});
if (subID != -1) {
packetMap[QStringLiteral("subID")] = subID;
}
NetworkPacket np(PACKET_TYPE_SMS_REQUEST, packetMap);
qCDebug(KDECONNECT_PLUGIN_SMS) << "Dispatching SMS send request to remote";
sendPacket(np);
}
void SmsPlugin::sendSms(const QString& address, const QString& messageBody)
......
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