mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-19 15:21:01 +10:00
Prevent notifications for chat and sensor adverts without a valid path
This commit is contained in:
@@ -3534,7 +3534,9 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||||||
|
|
||||||
_directRepeaters.removeWhere((r) => r.isStale());
|
_directRepeaters.removeWhere((r) => r.isStale());
|
||||||
|
|
||||||
if (contact.type == advTypeChat || contact.type == advTypeSensor) {
|
//We can use adverts from chat and sensor nodes, but only if the advert has a path to get the last hop.
|
||||||
|
if ((contact.type == advTypeChat || contact.type == advTypeSensor) &&
|
||||||
|
path.isEmpty) {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user