mirror of
https://github.com/kevachat/npsapp.git
synced 2025-01-28 07:44:16 +00:00
add multi-line messages support
This commit is contained in:
parent
43ad262344
commit
c547c67cf5
@ -38,8 +38,14 @@
|
||||
{
|
||||
"message":
|
||||
{
|
||||
"success":"Good, enter your message:",
|
||||
"failure":"Something went wrong, try again later!"
|
||||
"success":
|
||||
[
|
||||
"Good, enter your message:"
|
||||
],
|
||||
"failure":
|
||||
[
|
||||
"Something went wrong, try again later!"
|
||||
]
|
||||
},
|
||||
"debug":
|
||||
{
|
||||
@ -51,8 +57,14 @@
|
||||
{
|
||||
"message":
|
||||
{
|
||||
"success":"Thanks, your message successfully sent!",
|
||||
"failure":"Something went wrong, please make your feedback!"
|
||||
"success":
|
||||
[
|
||||
"Thanks, your message successfully sent!"
|
||||
],
|
||||
"failure":
|
||||
[
|
||||
"Something went wrong, please make your feedback!"
|
||||
]
|
||||
},
|
||||
"debug":
|
||||
{
|
||||
|
@ -154,8 +154,8 @@ $server->setPending(
|
||||
);
|
||||
}
|
||||
|
||||
return is_null($code) || $code == trim($request) ? $config->nps->action->pending->message->success . PHP_EOL
|
||||
: $config->nps->action->pending->message->failure . PHP_EOL;
|
||||
return is_null($code) || $code == trim($request) ? implode(PHP_EOL, $config->nps->action->pending->message->success) . PHP_EOL
|
||||
: implode(PHP_EOL, $config->nps->action->pending->message->failure) . PHP_EOL;
|
||||
}
|
||||
);
|
||||
|
||||
@ -207,8 +207,8 @@ $server->setHandler(
|
||||
);
|
||||
}
|
||||
|
||||
return $success ? $config->nps->action->handler->message->success . PHP_EOL
|
||||
: $config->nps->action->handler->message->failure . PHP_EOL;
|
||||
return $success ? implode(PHP_EOL, $config->nps->action->handler->message->success) . PHP_EOL
|
||||
: implode(PHP_EOL, $config->nps->action->handler->message->failure) . PHP_EOL;
|
||||
}
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user