Commit 8dbfcbaa authored by 杨培's avatar 杨培

接入 Hyperf 消息微服务

parent 2cf7d2e4
......@@ -19,12 +19,11 @@ Message::setDebug();
//$ret = Message::sendTemplateSms('18019580609', 'default_code', ['code'=>rand(1000, 9999)]);
//Message::setUserOnline(12, 60);
$ret = Message::isUseOnline(12);
//$ret = Message::isUseOnline(12);
//$ret = Message::sendSystemMessageAsync('remind', 0, 12, Message::TYPE_REMIND, [
// 'title' => '测试的标题',
// 'text'=>'新消息测试'.uniqid()
//]);
//print_r($ret);
$ret = Message::sendSystemMessageAsync('remind', 0, 12, Message::TYPE_REMIND, [
'title' => '测试的标题',
'text'=>'新消息测试'.uniqid()
]);
var_dump($ret);
\ No newline at end of file
......@@ -129,7 +129,7 @@ class Message extends Client
*/
public static function setUserOnline($uid, $status)
{
return self::invoke('/message/setUserOnline', func_get_args());
self::invoke('/message/setUserOnline', func_get_args());
}
/**
......@@ -147,7 +147,7 @@ class Message extends Client
*/
public static function sendSystemMessage($systemSessionId, $from, $to, $type, $content, $ext=[])
{
return self::call('message.sendSystemMessage', compact('systemSessionId', 'from', 'to', 'type', 'content', 'ext'));
return self::invoke('/message/sendSystemMessage', func_get_args());
}
/**
......@@ -164,7 +164,7 @@ class Message extends Client
*/
public static function sendSystemMessageAsync($systemSessionId, $from, $to, $type, $content, $ext=[])
{
return self::emit('message.sendSystemMessage', func_get_args());
return self::invoke('/message/sendSystemMessageAsync', func_get_args());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment