webhook: save json as one line

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-02-27 16:46:04 +01:00
parent f7842f4f60
commit 84ff8cec15
2 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@
* @license http://www.wtfpl.net/txt/copying/ WTFPLv2 * @license http://www.wtfpl.net/txt/copying/ WTFPLv2
* @since 30.01.2021 20:24 * @since 30.01.2021 20:24
* *
#### $$VERSION$$ v1.45-dev-28-g9958b5b #### $$VERSION$$ v1.45-dev-51-gf7842f4
***********************************************************/ ***********************************************************/
// bashbot home dir // bashbot home dir
@ -66,7 +66,7 @@
if ($data == '') { $data = implode(" ",$_GET); } if ($data == '') { $data = implode(" ",$_GET); }
} }
// uncomment to save last received JSON // uncomment to save last received JSON
// file_put_contents($json_file, $data); // file_put_contents($json_file, str_replace(array("\n", "\r"), '',$data). PHP_EOL));
// prepare for writing // prepare for writing
if ($data == '') { if ($data == '') {

View File

@ -1,2 +1 @@
{"update_id":665220889, {"update_id":665220889,"message":{"message_id":760,"from":{"id":586928566,"is_bot":false,"first_name":"Kay","last_name":"M","username":"KayM","language_code":"de"},"chat":{"id":589682731,"first_name":"Kay","last_name":"M","username":"KayM","type":"private"},"date":1612029749,"text":"/info","entities":[{"offset":0,"length":5,"type":"bot_command"}]}}
"message":{"message_id":760,"from":{"id":586928566,"is_bot":false,"first_name":"Kay","last_name":"M","username":"KayM","language_code":"de"},"chat":{"id":589682731,"first_name":"Kay","last_name":"M","username":"KayM","type":"private"},"date":1612029749,"text":"/info","entities":[{"offset":0,"length":5,"type":"bot_command"}]}}