checkIsPnSentFromPercept function

bool checkIsPnSentFromPercept(
  1. Map<String, dynamic> message
)

Implementation

bool checkIsPnSentFromPercept(Map<String, dynamic> message) {
  try {
    if (message.isNotEmpty &&
        message['pi_pn_metaData'] != null &&
        message['pi_pn_metaData'] is String) {
      Debug.print("PN is from Percept.");
      return true;
    }
    Debug.print("PN is not from Percept. Ignoring");
    return false;
  } catch (e, s) {
    Debug.print("Percept PN check failed: $e $s");
    return false;
  }
}