diff --git a/src/app/mainview/components/SmartListItemDelegate.qml b/src/app/mainview/components/SmartListItemDelegate.qml index 5d56c4db9d6fff10c789c352ffda9eb0d17943cf..11f173b2fadec850f4fb247ec08ebe1e1f537e26 100644 --- a/src/app/mainview/components/SmartListItemDelegate.qml +++ b/src/app/mainview/components/SmartListItemDelegate.qml @@ -76,10 +76,10 @@ ItemDelegate { Connections { target: PositionManager - function onPositionShareConvIdsChanged () { + function onPositionShareConvIdsCountChanged () { avatar.showSharePositionIndicator = PositionManager.isPositionSharedToConv(UID) } - function onSharingUrisChanged () { + function onSharingUrisCountChanged () { avatar.showSharedPositionIndicator = PositionManager.isConvSharingPosition(UID) } } diff --git a/src/app/positioning.cpp b/src/app/positioning.cpp index 27d79953ea73ba5957932bcfbe10967173ebedb9..d8a8bbf0768b2afa7b5ff93faa30d621b51d305a 100644 --- a/src/app/positioning.cpp +++ b/src/app/positioning.cpp @@ -80,7 +80,7 @@ void Positioning::positionUpdated(const QGeoPositionInfo& info) { Q_EMIT positioningError(""); - Q_EMIT newPosition(uri_, convertToJson(info), -1, ""); + Q_EMIT newPosition("", uri_, convertToJson(info), -1, ""); } void diff --git a/src/app/positioning.h b/src/app/positioning.h index d75e98d567feb2981af8a582dae1d1994a7152f2..9b3423c97af42b0e1f275041a8ef11a66c63e444 100644 --- a/src/app/positioning.h +++ b/src/app/positioning.h @@ -57,7 +57,8 @@ private Q_SLOTS: void locationServicesActivated(); Q_SIGNALS: - void newPosition(const QString& peerId, + void newPosition(const QString& unused_AccountId, + const QString& peerId, const QString& body, const uint64_t& timestamp, const QString& daemonId); diff --git a/src/app/positionmanager.cpp b/src/app/positionmanager.cpp index b21d4fa4df9036bdd5390eab00a7dbec015e92b1..e950455757b227bbb69889984ab4021543ddc302 100644 --- a/src/app/positionmanager.cpp +++ b/src/app/positionmanager.cpp @@ -9,8 +9,9 @@ #include <QJsonDocument> #include <QImageReader> -PositionManager::PositionManager(LRCInstance* instance, QObject* parent) +PositionManager::PositionManager(SystemTray* systemTray, LRCInstance* instance, QObject* parent) : QmlAdapterBase(instance, parent) + , systemTray_(systemTray) { timerTimeLeftSharing_ = new QTimer(this); timerStopSharing_ = new QTimer(this); @@ -19,36 +20,26 @@ PositionManager::PositionManager(LRCInstance* instance, QObject* parent) }); connect(timerStopSharing_, &QTimer::timeout, [=] { stopSharingPosition(); }); connect(lrcInstance_, &LRCInstance::selectedConvUidChanged, [this]() { - Q_EMIT positionShareConvIdsChanged(); set_mapAutoOpening(true); }); + connect(lrcInstance_, &LRCInstance::currentAccountIdChanged, [this]() { + localPositioning_->setUri(lrcInstance_->getCurrentAccountInfo().profileInfo.uri); + }); set_isMapActive(false); } void PositionManager::safeInit() { - connect(lrcInstance_, &LRCInstance::currentAccountIdChanged, [this]() { - connectConversationModel(); - set_sharingUris({}); - objectListSharingUris_.clear(); - set_positionShareConvIds({}); - localPositioning_->setUri(lrcInstance_->getCurrentAccountInfo().profileInfo.uri); - }); - set_sharingUris({}); - objectListSharingUris_.clear(); - set_positionShareConvIds({}); localPositioning_.reset(new Positioning(lrcInstance_->getCurrentAccountInfo().profileInfo.uri)); - connectConversationModel(); + connectAccountModel(); } void -PositionManager::connectConversationModel() +PositionManager::connectAccountModel() { - auto currentConversationModel = lrcInstance_->getCurrentConversationModel(); - - QObject::connect(currentConversationModel, - &ConversationModel::newPosition, + QObject::connect(&lrcInstance_->accountModel(), + &AccountModel::newPosition, this, &PositionManager::onPositionReceived, Qt::UniqueConnection); @@ -90,7 +81,8 @@ PositionManager::isConvSharingPosition(const QString& convUri) .participantsUris(); Q_FOREACH (const auto& id, convParticipants) { if (id != lrcInstance_->getCurrentAccountInfo().profileInfo.uri) { - if (sharingUris_.contains(id)) { + if (objectListSharingUris_.contains( + QPair<QString, QString> {lrcInstance_->get_currentAccountId(), id})) { return true; } } @@ -109,34 +101,37 @@ PositionManager::loadPreviousLocations() jsonObj.insert("long", it.value()->getLongitude().toString()); QJsonDocument doc(jsonObj); QString strJson(doc.toJson(QJsonDocument::Compact)); - onPositionReceived(it.key(), strJson, -1, ""); + onPositionReceived(it.key().first, it.key().second, strJson, -1, ""); } } bool -PositionManager::isPositionSharedToConv(const QString& convUri) +PositionManager::isPositionSharedToConv(const QString& convUid) { if (positionShareConvIds_.length()) { - auto iter = std::find(positionShareConvIds_.begin(), positionShareConvIds_.end(), convUri); + auto iter = std::find(positionShareConvIds_.begin(), + positionShareConvIds_.end(), + QPair<QString, QString> {lrcInstance_->get_currentAccountId(), + convUid}); return (iter != positionShareConvIds_.end()); } return false; } void -PositionManager::sendPosition(const QString& peerId, const QString& body) +PositionManager::sendPosition(const QString& body) { try { - Q_FOREACH (const auto& id, positionShareConvIds_) { - const auto& convInfo = lrcInstance_->getConversationFromConvUid(id); + Q_FOREACH (const auto& key, positionShareConvIds_) { + const auto& convInfo = lrcInstance_->getConversationFromConvUid(key.second, key.first); + auto accountUri = lrcInstance_->getAccountInfo(key.first).profileInfo.uri; Q_FOREACH (const QString& uri, convInfo.participantsUris()) { - if (peerId != uri) { - lrcInstance_->getCurrentAccountInfo() + if (uri != accountUri) { + lrcInstance_->getAccountInfo(key.first) .contactModel->sendDhtMessage(uri, body, APPLICATION_GEO); } } } - } catch (const std::exception& e) { qDebug() << Q_FUNC_INFO << e.what(); } @@ -151,24 +146,28 @@ PositionManager::onWatchdogTimeout() [obj](const auto& it) { return it == obj; }); if (it != objectListSharingUris_.cend()) { QString stopMsg("{\"type\":\"Stop\"}"); - onPositionReceived(it.key(), stopMsg, -1, ""); + onPositionReceived(it.key().first, it.key().second, stopMsg, -1, ""); } } void PositionManager::sharePosition(int maximumTime) { - connect(localPositioning_.get(), - &Positioning::newPosition, - this, - &PositionManager::sendPosition, - Qt::UniqueConnection); + connect( + localPositioning_.get(), + &Positioning::newPosition, + this, + [&](const QString&, const QString&, const QString& body, const uint64_t&, const QString&) { + sendPosition(body); + }, + Qt::UniqueConnection); try { startPositionTimers(maximumTime); const auto convUid = lrcInstance_->get_selectedConvUid(); - positionShareConvIds_.append(convUid); - Q_EMIT positionShareConvIdsChanged(); + positionShareConvIds_.append( + QPair<QString, QString> {lrcInstance_->get_currentAccountId(), convUid}); + set_positionShareConvIdsCount(positionShareConvIds_.size()); } catch (...) { qDebug() << "Exception during sharePosition:"; } @@ -180,9 +179,10 @@ PositionManager::stopSharingPosition(const QString convId) QString stopMsg; stopMsg = "{\"type\":\"Stop\"}"; if (convId == "") { - sendPosition(lrcInstance_->getCurrentAccountInfo().profileInfo.uri, stopMsg); + sendPosition(stopMsg); stopPositionTimers(); - set_positionShareConvIds({}); + positionShareConvIds_.clear(); + set_positionShareConvIdsCount(positionShareConvIds_.size()); } else { const auto& convInfo = lrcInstance_->getConversationFromConvUid(convId); Q_FOREACH (const QString& uri, convInfo.participantsUris()) { @@ -192,11 +192,14 @@ PositionManager::stopSharingPosition(const QString convId) APPLICATION_GEO); } } - auto iter = std::find(positionShareConvIds_.begin(), positionShareConvIds_.end(), convId); + auto iter = std::find(positionShareConvIds_.begin(), + positionShareConvIds_.end(), + QPair<QString, QString> {lrcInstance_->get_currentAccountId(), + convId}); if (iter != positionShareConvIds_.end()) { positionShareConvIds_.remove(std::distance(positionShareConvIds_.begin(), iter)); } - Q_EMIT positionShareConvIdsChanged(); + set_positionShareConvIdsCount(positionShareConvIds_.size()); } } @@ -208,15 +211,16 @@ PositionManager::setMapActive(bool state) } QString -PositionManager::getAvatar(const QString& uri) +PositionManager::getAvatar(const QString& accountId, const QString& uri) { QString avatarBase64; QByteArray ba; QBuffer bu(&ba); - auto& accInfo = lrcInstance_->getCurrentAccountInfo(); + auto& accInfo = accountId == "" ? lrcInstance_->getCurrentAccountInfo() + : lrcInstance_->getAccountInfo(accountId); auto currentAccountUri = accInfo.profileInfo.uri; - if (currentAccountUri == uri) { + if (currentAccountUri == uri || accountId.isEmpty()) { // use accountPhoto Utils::accountPhoto(lrcInstance_, accInfo.id).save(&bu, "PNG"); } else { @@ -271,7 +275,36 @@ PositionManager::onPositionErrorReceived(const QString error) } void -PositionManager::onPositionReceived(const QString& peerId, +PositionManager::showNotification(const QString& accountId, + const QString& convId, + const QString& from) +{ + auto bestName = lrcInstance_->getAccountInfo(accountId).contactModel->bestNameForContact(from); + auto body = tr("%1 is sharing it's location").arg(bestName); +#ifdef Q_OS_LINUX + auto contactPhoto = Utils::contactPhoto(lrcInstance_, from, QSize(50, 50), accountId); + auto notifId = QString("%1;%2;%3").arg(accountId).arg(convId).arg(from); + systemTray_->showNotification(notifId, + tr("Location sharing"), + body, + NotificationType::CHAT, + Utils::QImageToByteArray(contactPhoto)); + +#else + auto onClicked = [this, accountId, convId] { + Q_EMIT lrcInstance_->notificationClicked(); + const auto& convInfo = lrcInstance_->getConversationFromConvUid(convId, accountId); + if (convInfo.uid.isEmpty()) + return; + lrcInstance_->selectConversation(convInfo.uid, accountId); + }; + systemTray_->showNotification(body, from, onClicked); +#endif +} + +void +PositionManager::onPositionReceived(const QString& accountId, + const QString& peerId, const QString& body, const uint64_t& timestamp, const QString& daemonId) @@ -290,7 +323,7 @@ PositionManager::onPositionReceived(const QString& peerId, QVariantMap shareInfo; shareInfo["author"] = peerId; if (!update) { - shareInfo["avatar"] = getAvatar(peerId); + shareInfo["avatar"] = getAvatar(accountId, peerId); } shareInfo["long"] = newPosition["long"]; shareInfo["lat"] = newPosition["lat"]; @@ -298,6 +331,8 @@ PositionManager::onPositionReceived(const QString& peerId, }; auto endSharing = newPosition["type"] == "Stop"; + auto key = QPair<QString, QString> {accountId, peerId}; + if (!endSharing) { // open map on position reception if (!isMapActive_ && mapAutoOpening_ && isPeerIdInConv @@ -305,19 +340,18 @@ PositionManager::onPositionReceived(const QString& peerId, set_isMapActive(true); } } - auto iter = std::find(currentConvSharingUris_.begin(), currentConvSharingUris_.end(), peerId); + auto iter = std::find(currentConvSharingUris_.begin(), currentConvSharingUris_.end(), key); if (iter == currentConvSharingUris_.end()) { // New share if (!endSharing) { - sharingUris_.insert(peerId); - Q_EMIT sharingUrisChanged(); - // list to save more information on position + watchdog - auto it = objectListSharingUris_.find(peerId); - if (it == objectListSharingUris_.end()) { + auto it = objectListSharingUris_.find(key); + auto isNewSharing = it == objectListSharingUris_.end(); + if (isNewSharing) { auto obj = new PositionObject(newPosition["lat"], newPosition["long"], this); - objectListSharingUris_.insert(peerId, obj); + objectListSharingUris_.insert(key, obj); + set_sharingUrisCount(objectListSharingUris_.size()); connect(obj, &PositionObject::timeout, this, @@ -326,40 +360,42 @@ PositionManager::onPositionReceived(const QString& peerId, } if (isPeerIdInConv) { - currentConvSharingUris_.insert(peerId); + currentConvSharingUris_.insert(key); Q_EMIT positionShareAdded(getShareInfo(false)); + } else if (isNewSharing && accountId != "") { + auto& convInfo = lrcInstance_->getConversationFromPeerUri(peerId, accountId); + if (!convInfo.uid.isEmpty()) { + showNotification(accountId, convInfo.uid, peerId); + } } // stop sharing position } else { - sharingUris_.remove(peerId); - Q_EMIT sharingUrisChanged(); - auto it = objectListSharingUris_.find(peerId); + auto it = objectListSharingUris_.find(key); if (it != objectListSharingUris_.end()) { it.value()->deleteLater(); objectListSharingUris_.erase(it); + set_sharingUrisCount(objectListSharingUris_.size()); } } } else { // Update/remove existing if (endSharing) { // Remove - - sharingUris_.remove(peerId); - Q_EMIT sharingUrisChanged(); - auto it = objectListSharingUris_.find(peerId); + auto it = objectListSharingUris_.find(key); if (it != objectListSharingUris_.end()) { it.value()->deleteLater(); objectListSharingUris_.erase(it); + set_sharingUrisCount(objectListSharingUris_.size()); } if (isPeerIdInConv) { - currentConvSharingUris_.remove(peerId); + currentConvSharingUris_.remove(key); Q_EMIT positionShareRemoved(peerId); // close the map if you're not sharing and you don't receive position anymore if (!positionShareConvIds_.length() - && ((sharingUris_.size() == 1 - && sharingUris_.contains( - lrcInstance_->getCurrentAccountInfo().profileInfo.uri)) - || sharingUris_.size() == 0)) { + && ((sharingUrisCount_ == 1 + && objectListSharingUris_.contains(QPair<QString, QString> { + "", lrcInstance_->getCurrentAccountInfo().profileInfo.uri})) + || sharingUrisCount_ == 0)) { set_isMapActive(false); } } @@ -369,7 +405,7 @@ PositionManager::onPositionReceived(const QString& peerId, Q_EMIT positionShareUpdated(getShareInfo(true)); // reset watchdog - auto it = objectListSharingUris_.find(peerId); + auto it = objectListSharingUris_.find(key); if (it != objectListSharingUris_.end()) { it.value()->resetWatchdog(); } diff --git a/src/app/positionmanager.h b/src/app/positionmanager.h index 0111a4d9da92ca603502a068ff60439c663f3a78..fc8c53a3c0efb28ebcdb443904e07245c383362a 100644 --- a/src/app/positionmanager.h +++ b/src/app/positionmanager.h @@ -22,6 +22,7 @@ #include "qmladapterbase.h" #include "positioning.h" #include "positionobject.h" +#include "systemtray.h" #include <QObject> #include <QString> @@ -31,11 +32,13 @@ class PositionManager : public QmlAdapterBase Q_OBJECT QML_RO_PROPERTY(bool, isMapActive) QML_RO_PROPERTY(int, timeSharingRemaining) - QML_PROPERTY(QList<QString>, positionShareConvIds) - QML_PROPERTY(QSet<QString>, sharingUris) + QML_PROPERTY(int, positionShareConvIdsCount) + QML_PROPERTY(int, sharingUrisCount) QML_PROPERTY(bool, mapAutoOpening) public: - explicit PositionManager(LRCInstance* instance, QObject* parent = nullptr); + explicit PositionManager(SystemTray* systemTray, + LRCInstance* instance, + QObject* parent = nullptr); ~PositionManager() = default; Q_SIGNALS: @@ -47,13 +50,13 @@ Q_SIGNALS: protected: void safeInit() override; - QString getAvatar(const QString& peerId); + QString getAvatar(const QString& accountId, const QString& peerId); QVariantMap parseJsonPosition(const QString& body, const QString& peerId); void positionWatchDog(); void startPositionTimers(int timeSharing); void stopPositionTimers(); - Q_INVOKABLE void connectConversationModel(); + Q_INVOKABLE void connectAccountModel(); Q_INVOKABLE void setMapActive(bool state); Q_INVOKABLE void sharePosition(int maximumTime); Q_INVOKABLE void stopSharingPosition(const QString convId = ""); @@ -69,17 +72,21 @@ protected: private Q_SLOTS: void onPositionErrorReceived(const QString error); - void onPositionReceived(const QString& peerId, + void onPositionReceived(const QString& accountId, + const QString& peerId, const QString& body, const uint64_t& timestamp, const QString& daemonId); - void sendPosition(const QString& peerId, const QString& body); + void sendPosition(const QString& body); void onWatchdogTimeout(); + void showNotification(const QString& accountId, const QString& convId, const QString& from); private: + SystemTray* systemTray_; std::unique_ptr<Positioning> localPositioning_; QTimer* timerTimeLeftSharing_ = nullptr; QTimer* timerStopSharing_ = nullptr; - QSet<QString> currentConvSharingUris_; - QMap<QString, PositionObject*> objectListSharingUris_; + QSet<QPair<QString, QString>> currentConvSharingUris_; + QMap<QPair<QString, QString>, PositionObject*> objectListSharingUris_; + QList<QPair<QString, QString>> positionShareConvIds_; }; diff --git a/src/app/qmlregister.cpp b/src/app/qmlregister.cpp index bf9edc0caf8f4a9b33fb18b7f1276ea14e8c08b1..6a57fe61c88cc043ae55d2e7256f9b02a2ffd589 100644 --- a/src/app/qmlregister.cpp +++ b/src/app/qmlregister.cpp @@ -111,7 +111,7 @@ registerTypes(QQmlEngine* engine, // setup the adapters (their lifetimes are that of MainApplication) auto callAdapter = new CallAdapter(systemTray, lrcInstance, parent); auto messagesAdapter = new MessagesAdapter(settingsManager, previewEngine, lrcInstance, parent); - auto positionManager = new PositionManager(lrcInstance, parent); + auto positionManager = new PositionManager(systemTray, lrcInstance, parent); auto conversationsAdapter = new ConversationsAdapter(systemTray, lrcInstance, parent); auto avAdapter = new AvAdapter(lrcInstance, parent); auto contactAdapter = new ContactAdapter(lrcInstance, parent); diff --git a/src/app/webengine/map/MapPosition.qml b/src/app/webengine/map/MapPosition.qml index 1da46a4e27cc92cb2b6dc3308b9c4f1262153f00..17d9f723219a25fc163efaabfaecff7b0df446c3 100644 --- a/src/app/webengine/map/MapPosition.qml +++ b/src/app/webengine/map/MapPosition.qml @@ -61,7 +61,7 @@ Rectangle { property bool isLoaded: false property var positionList: PositionManager.positionList; property var avatarPositionList: PositionManager.avatarPositionList; - property bool isSharing: (PositionManager.positionShareConvIds.length !== 0 ) + property bool isSharing: (PositionManager.positionShareConvIdsCount !== 0 ) function loadScripts () { var scriptMapJs = { @@ -276,7 +276,7 @@ Rectangle { property bool isError: positioningError.length onClicked: { if (!isError) { - if (PositionManager.positionShareConvIds.length >= 2) { + if (PositionManager.positionShareConvIdsCount >= 2) { stopSharingPositionPopup.open() } else { PositionManager.stopSharingPosition(); diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp index 91a4cd8581e10a032db7199e7c6f20feaa59dbff..fa796210c99ae9980113206d536bdd5948a3f3c2 100644 --- a/src/libclient/accountmodel.cpp +++ b/src/libclient/accountmodel.cpp @@ -177,6 +177,20 @@ public Q_SLOTS: void slotAccountProfileReceived(const QString& accountId, const QString& displayName, const QString& userPhoto); + + /** + * Emit new position + * @param accountId + * @param peerId + * @param body + * @param timestamp + * @param daemonId + */ + void slotNewPosition(const QString& accountId, + const QString& peerId, + const QString& body, + const uint64_t& timestamp, + const QString& daemonId) const; }; AccountModel::AccountModel(Lrc& lrc, @@ -415,6 +429,10 @@ AccountModelPimpl::AccountModelPimpl(AccountModel& linked, &CallbacksHandler::accountProfileReceived, this, &AccountModelPimpl::slotAccountProfileReceived); + connect(&callbacksHandler, + &CallbacksHandler::newPosition, + this, + &AccountModelPimpl::slotNewPosition); } AccountModelPimpl::~AccountModelPimpl() {} @@ -698,6 +716,16 @@ AccountModelPimpl::slotAccountProfileReceived(const QString& accountId, Q_EMIT linked.profileUpdated(accountId); } +void +AccountModelPimpl::slotNewPosition(const QString& accountId, + const QString& peerId, + const QString& body, + const uint64_t& timestamp, + const QString& daemonId) const +{ + Q_EMIT linked.newPosition(accountId, peerId, body, timestamp, daemonId); +} + void AccountModelPimpl::addToAccounts(const QString& accountId, std::shared_ptr<Database> db) { diff --git a/src/libclient/api/accountmodel.h b/src/libclient/api/accountmodel.h index 73c2bbfde299401b82d7f9a44eaa4bcac8671f81..1eca832a0e61ac3338bc1adb40a1e29ddc0e66e4 100644 --- a/src/libclient/api/accountmodel.h +++ b/src/libclient/api/accountmodel.h @@ -326,6 +326,15 @@ Q_SIGNALS: */ void migrationEnded(const QString& accountId, bool ok); + /** + * Emitted when a conversation receives a new position + */ + void newPosition(const QString& accountId, + const QString& peerId, + const QString& body, + const uint64_t& timestamp, + const QString& daemonId) const; + private: std::unique_ptr<AccountModelPimpl> pimpl_; }; diff --git a/src/libclient/api/conversationmodel.h b/src/libclient/api/conversationmodel.h index 73e7530b8a0ad74445734e4d58f55f80307c222e..cd5849d188bc3752840fb0b42df2c49d1684856d 100644 --- a/src/libclient/api/conversationmodel.h +++ b/src/libclient/api/conversationmodel.h @@ -440,14 +440,6 @@ public: Q_SIGNALS: - /** - * Emitted when a conversation receives a new position - */ - void newPosition(const QString& peerId, - const QString& body, - const uint64_t& timestamp, - const QString& daemonId) const; - /** * Emitted when a conversation receives a new interaction * @param uid of conversation diff --git a/src/libclient/callbackshandler.cpp b/src/libclient/callbackshandler.cpp index b35e2173fc8b23727d3cee719e94665bea97f991..a401319972135db8077c6a0a11cbb0fa3a9fbd74 100644 --- a/src/libclient/callbackshandler.cpp +++ b/src/libclient/callbackshandler.cpp @@ -32,6 +32,8 @@ #include "dbus/presencemanager.h" #include "dbus/videomanager.h" +#include "typedefs.h" + // libjami #include <datatransfer_interface.h> @@ -386,6 +388,12 @@ CallbacksHandler::slotNewAccountMessage(const QString& accountId, const MapStringString& payloads) { auto peerId2 = QString(peerId).replace("@ring.dht", ""); + for (const auto& payload : payloads.keys()) { + if (payload.contains(APPLICATION_GEO)) { + Q_EMIT newPosition(accountId, peerId, payloads.value(payload), 0, msgId); + return; + } + } Q_EMIT newAccountMessage(accountId, peerId2, msgId, payloads); } diff --git a/src/libclient/callbackshandler.h b/src/libclient/callbackshandler.h index 0466f7ec9f78751b9f42714e57efec740224b219..b9fbf6541bf156be007c10632934de8241a4bc85 100644 --- a/src/libclient/callbackshandler.h +++ b/src/libclient/callbackshandler.h @@ -388,6 +388,14 @@ Q_SIGNALS: const QString& conversationId, const MapStringString& preferences); + /** + * Emitted when a conversation receives a new position + */ + void newPosition(const QString& accountId, + const QString& peerId, + const QString& body, + const uint64_t& timestamp, + const QString& daemonId) const; private Q_SLOTS: /** * Emit newAccountMessage diff --git a/src/libclient/conversationmodel.cpp b/src/libclient/conversationmodel.cpp index 26c8ddc416029d8dd77d4cf86af587a4f6062894..45d777fa916867b525fa6f1d05fe999219ec5266 100644 --- a/src/libclient/conversationmodel.cpp +++ b/src/libclient/conversationmodel.cpp @@ -3572,8 +3572,6 @@ ConversationModelPimpl::slotNewAccountMessage(const QString& accountId, for (const auto& payload : payloads.keys()) { if (payload.contains(TEXT_PLAIN)) { addIncomingMessage(peerId, payloads.value(payload), 0, msgId); - } else if (payload.contains(APPLICATION_GEO)) { - Q_EMIT linked.newPosition(peerId, payloads.value(payload), 0, msgId); } else { qWarning() << payload; }