Last active
August 1, 2017 04:55
-
-
Save murachi1208/b2613f3b2522cdeff51702d62c7b01e2 to your computer and use it in GitHub Desktop.
CentOS7.3 環境(Vagrant)に Mattermost いれたので php で bot を追加してみる(Outgoing WebHooks) その1 ref: http://qiita.com/murachi1208/items/f06c614910b717026d3e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_POST['token'] != "bsfwydtxc3rgznwki35gw6s5to") { return; } | |
$text = $_POST['text']; | |
$query = preg_split('/[\s\x{3000}]/u', $text, 2); | |
echo json_encode(array("icon_url" => "/static/emoji/1f697.png", "username" => "echo", "text" => date("Y/m/d H:i:s") . " " . $query[1])); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
・統合機能によるユーザー名の上書きを許可する: | |
・統合機能によるプロフィール画像アイコンの上書きを許可する | |
・統合機能の管理を管理者のみに制限する |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment