Skip to content

Commit 9038c7a

Browse files
committed
add customurl support for onsignal
1 parent e06a75b commit 9038c7a

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

OpenFlowNodeRED/src/nodered/nodes/onesignal.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@
4343
<label ><i class="fa fa-tag"></i> Include player ids</label>
4444
<input type="text" id="node-input-include_player_ids" placeholder="Segments diveded by comma">
4545
</div>
46+
<div class="form-row">
47+
<label ><i class="fa fa-tag"></i> CustomURL</label>
48+
<input type="text" id="node-input-customurl" placeholder="Custom URL">
49+
</div>
4650
<div class="form-row">
4751
<label ><i class="fa fa-tag"></i> URL</label>
4852
<input type="text" id="node-input-url" placeholder="Deeplink URL">
4953
</div>
50-
5154
<div class="form-row" style="margin-bottom: 0px;">
5255
<label for="node-input-contents"><i class="fa fa-wrench"></i> EXAMPLE! payload</label>
5356
<input type="hidden" id="node-input-contents" autofocus="autofocus">
@@ -76,6 +79,7 @@
7679
excluded_segments: { value: "", required: false },
7780
include_player_ids: { value: "", required: false },
7881
url: { value: "", required: false },
82+
customurl: { value: "", required: false },
7983
contents: {
8084
value:
8185
`{ "en": "hi mom" }`, required: true

OpenFlowNodeRED/src/nodered/nodes/onesignal_nodes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface Icreate_notification {
2929
config: any;
3030
contents: string;
3131
url: string;
32+
customurl: string;
3233
included_segments: string | string[];
3334
excluded_segments: string | string[];
3435
include_player_ids: string | string[];
@@ -62,6 +63,8 @@ export class create_notification {
6263

6364
if (!NoderedUtil.IsNullEmpty(msg.payload)) { this.config.contents = msg.payload; }
6465
if (!NoderedUtil.IsNullEmpty(msg.url)) { this.config.url = msg.url; }
66+
if (!NoderedUtil.IsNullEmpty(msg.customurl)) { this.config.customurl = msg.customurl; }
67+
6568
if (!NoderedUtil.IsNullEmpty(msg.included_segments)) { this.config.included_segments = msg.included_segments; }
6669
if (!NoderedUtil.IsNullEmpty(msg.excluded_segments)) { this.config.excluded_segments = msg.excluded_segments; }
6770
if (!NoderedUtil.IsNullEmpty(msg.include_player_ids)) { this.config.include_player_ids = msg.include_player_ids; }
@@ -75,7 +78,7 @@ export class create_notification {
7578
'included_segments': Array.isArray(this.config.included_segments) ? this.config.included_segments : [this.config.included_segments],
7679
'excluded_segments': Array.isArray(this.config.excluded_segments) ? this.config.excluded_segments : [this.config.excluded_segments],
7780
'include_player_ids': Array.isArray(this.config.include_player_ids) ? this.config.include_player_ids : [this.config.include_player_ids],
78-
'data': { 'URL': this.config.url },
81+
'data': { 'customurl': this.config.customurl },
7982
'url': this.config.url
8083
};
8184

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.329
1+
0.0.330

0 commit comments

Comments
 (0)