forked from travisghansen/node-red-slack
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmatterMostPost.html
More file actions
75 lines (64 loc) · 2.99 KB
/
Copy pathmatterMostPost.html
File metadata and controls
75 lines (64 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!--
Copyright 2015 Adrian Lansdown
Not created by, affiliated with, or supported by Slack Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-template-name="matterMost">
<div class="form-row">
<label for="node-input-channelURL"><i class="fa fa-slack"></i> WebHook URL</label>
<input type="text" id="node-input-channelURL" placeholder="channelURL" style=" vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-username"><i class="fa fa-user"></i> Posting UserName</label>
<input type="text" id="node-input-username" placeholder="username" style=" vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-iconURL"><i class="fa fa-smile-o"></i> User Icon URL</label>
<input type="text" id="node-input-iconURL" placeholder="iconURL" style=" vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-channel"><i class="fa fa-random"></i> Channel</label>
<input type="text" id="node-input-channel" placeholder="optional channel override">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="matterMost">
<p>Sends the <b>msg.payload</b> to Matter Most.</p>
<p>Simple way to post to a Matter Most channel.</p>
<p>You can optionally override the destination channel if required - either in the edit dialogue or by setting <b>msg.channel</b>.</p>
<p>You can also create <a href="https://docs.mattermost.com/developer/message-attachments.html" target="_new">Matter Most attachments</a> by adding a <b>msg.attachments</b> property that must be an array. Then leave msg.text blank or unset it since be becomes the payload</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('matterMost',{
category: 'social',
defaults: {
name: {value:""},
channelURL: {value:"", required:true},
username: {value:""},
iconURL: {value:""},
channel: {value:""}
},
color:"#2D70C0",
icon: "mattermost.png",
align: "right",
inputs:1,
outputs:0,
label: function() {
return this.name||"matterMost";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>