Skip to content

Instantly share code, notes, and snippets.

@murachi1208
Last active August 1, 2017 04:55
Show Gist options
  • Save murachi1208/b2613f3b2522cdeff51702d62c7b01e2 to your computer and use it in GitHub Desktop.
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
<?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;
・統合機能によるユーザー名の上書きを許可する:
・統合機能によるプロフィール画像アイコンの上書きを許可する
・統合機能の管理を管理者のみに制限する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment