Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
Enhancement: Notification & LinkTemplate support setting logo and log…
Browse files Browse the repository at this point in the history
…o_url
  • Loading branch information
cncal committed Jun 18, 2018
1 parent 80107b3 commit 2f6d14c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Getui::pushMessageToApp($data);
'template_data' => [
'title' => '', // 通知标题,string(40), 必填
'text' => '', // 通知内容,string(600), 必填
'logo' => '', // 通知图标名称,string(40), 必填
'logo_url' => '', // 通知图标url地址,string(100), 必填
'transmission_type' => 2, // 是否立即启动应用:1 立即启动 2 等待客户端自启动,必填
'transmission_content' => '', // 透传内容,不支持转义字符,string(2048), 必填
]
Expand All @@ -113,6 +115,8 @@ Getui::pushMessageToApp($data);
'title' => '', // 通知标题,string(40), 必填
'text' => '', // 通知内容,string(600), 必填
'url' => '', // 点击通知后打开的网页地址,string(200), 必填
'logo' => '', // 通知图标名称,string(40), 必填
'logo_url' => '', // 通知图标url地址,string(100), 必填
]
'cid' => 'target cid', // 推送通知至指定用户时填写
'cid_list' => ['cid1','cid2',...], // 推送通知至指定用户列表时填写
Expand Down Expand Up @@ -191,6 +195,10 @@ Getui::pushMessageToApp($data);
* [推送结果返回值](http://docs.getui.com/server/php/push/#7)

* 版本更新说明:
* v0.1.2:
* Enhancement:点击通知打开应用模板和点击通知打开网页模板支持设置通知图标名称和通知图标 url 地址
* v0.1.1:
* Enhancement:IOS 透传消息模板中支持 category(在客户端通知栏触发特定的action和button显示)
* v0.1.0:
* 新功能:支持队列
* 针对 Laravel5.5LTS 新功能 Package Discovery 更新 `composer.json`
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/PushGetuiMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PushGetuiMessage implements ShouldQueue
* @param $message
* @param $extra_param
*/
public function __construct(IGtPush $igt, $function, $message, $extra_param)
public function __construct(IGtPush $igt, $function, $message, $extra_param = NULL)
{
$this->igt = $igt;
$this->function = $function;
Expand Down
4 changes: 4 additions & 0 deletions src/sdk/igetui/template/GetuiTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ private function IGtNotificationTemplate()
$template->set_transmissionContent($transmission_content);
$template->set_title($title);
$template->set_text($text);
$template->set_logo($logo);
$template->set_logoURL($logo_url);
$template->set_isRing(isset($is_ring) ? (boolean)$is_ring : $this->is_ring);
$template->set_isVibrate(isset($is_vibrate) ? (boolean)$is_vibrate : $this->is_vibrate);
$template->set_isClearable(isset($is_clearable) ? (boolean)$is_clearable : $this->is_clearable);
Expand Down Expand Up @@ -135,6 +137,8 @@ private function IGtLinkTemplate()
$template->set_title($title);
$template->set_text($text);
$template->set_url($url);
$template->set_logo($logo);
$template->set_logoURL($logo_url);
$template->set_isRing(isset($is_ring) ? (boolean)$is_ring : $this->is_ring);
$template->set_isVibrate(isset($is_vibrate) ? (boolean)$is_vibrate : $this->is_vibrate);
$template->set_isClearable(isset($is_clearable) ? (boolean)$is_clearable : $this->is_clearable);
Expand Down

0 comments on commit 2f6d14c

Please sign in to comment.