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

R
A new Android app was released

This reverts commit 4266834052.
This commit is contained in:
Albert Vaca Cintora 2020-11-02 10:32:18 +01:00
parent 18031e97a9
commit 0f32462e26

View file

@ -59,15 +59,26 @@ bool SmsPlugin::receivePacket(const NetworkPacket& np)
void SmsPlugin::sendSms(const QDBusVariant& addresses, const QString& messageBody, const qint64 subID) void SmsPlugin::sendSms(const QDBusVariant& addresses, const QString& messageBody, const qint64 subID)
{ {
Q_UNUSED(subID) QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
const QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
if (addressList.isEmpty()) { QVariantList addressMapList;
qCDebug(KDECONNECT_PLUGIN_SMS) << "Empty address list"; for (const ConversationAddress address : addressList) {
return; 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) void SmsPlugin::sendSms(const QString& address, const QString& messageBody)