30 if (defined(
'WA_EDNA_RU_TEMPLATES_STUB') && WA_EDNA_RU_TEMPLATES_STUB ===
true)
35 $params = [
'imType' =>
'whatsapp'];
38 $params[
'subject'] = $subject;
43 $this->optionManager->getOption(InternalOption::API_KEY),
47 $templatesRequestResult =
$externalSender->callExternalMethod(
'getOutMessageMatchers', $params);
48 if ($templatesRequestResult->isSuccess())
50 $templates = $templatesRequestResult->getData();
53 if ($checkErrors->isSuccess())
56 $result->setData($templates);
60 $result->addErrors($checkErrors->getErrors());
65 $result->addErrors($templatesRequestResult->getErrors());