addMessageFromDevice method
Adds message received to the device where it comes from.
Implementation
Device? addMessageFromDevice(String endpointId, NearbyMessage message) {
Device? device = _findDevice(connectedDevices, endpointId);
if (device == null) {
logger.e("Could not find device $endpointId");
return null;
}
device.addMessage(message);
return device;
}