main/build/api/module/message.php

34 lines
497 B
PHP
Raw Permalink Normal View History

<?php
/**
* Created by PhpStorm.
* User: lucas
* Date: 07/12/17
* Time: 19:48
*/
namespace api\module;
use kwebsocket\core\wsinterop;
class message
{
public function POST_emergency($argv){
extract($argv);
$wsi = new wsinterop("localhost",9997);
$wsi->send([
"operation" => "PostMessage",
"message" => $message,
"username" => $username,
"channelType" => "Emergency",
"channelName" => $URL_0
]);
return ["sent" => true];
//TODO: tout poster dans la BDD
}
}