checkElementDisabled static method

bool checkElementDisabled(
  1. Map<String, bool?> interactionMap,
  2. BaseInteractiveElement element,
  3. bool isSentByMe,
  4. InteractiveMessage message,
)

Implementation

static bool checkElementDisabled(
  Map<String, bool?> interactionMap,
  BaseInteractiveElement element,
  bool isSentByMe,
  InteractiveMessage message,
) {
  if (interactionMap[element.elementId] != null &&
      element.disableAfterInteracted == true) {
    return true;
  } else if (isSentByMe == true && message.allowSenderInteraction == false) {
    return true;
  }

  return false;
}