Please help us help you and fill where relevant: Telegram Plugin (
github.com/LibreCodeCoop/LSTelegramNotify/tree/main
)
Your LimeSurvey version: [5x and 6x]
Own server or LimeSurvey hosting: Own Server
==================
Hi Guys, we are using a Telegram Plugin for Notification, is a great solution for not use Email Notifications, but now, we need receive entire responses into message without pdf, so, we modify the plugin but only we receive questions codes and answers codes now its content. Maybe can help us with this?
We Add this code into sendmessage function, after $
text variable definition and before $telegram->sendMensagge:
Code:
// Desde aqui
$response = $this->pluginManager->getAPI()->getResponse($surveyId, $responseId);
$answersText = "";
if ($response) {
foreach ($response as $questionCode => $answerValue) {
if (is_array($answerValue)) {
$answerValue = implode(", ", $answerValue);
}
$answersText .= htmlspecialchars($questionCode) . ": " . htmlspecialchars($answerValue) . "\n"; } }
$text .= "\nRespuestas:\n" . $answersText;
// Hasta aQUI
I receive telegram notification but with question and answers codes without content, for do it same content like email notification?.
Regards,