45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('chats-in',{
|
|
category: 'whatsapp',
|
|
color: '#25D366',
|
|
defaults: {
|
|
name: {value:"Chats In"},
|
|
whatsappLink: {value:"whatsapp-web", type:'whatsappLink'}
|
|
},
|
|
outputs:1,
|
|
icon: 'whatsappLink.svg',
|
|
label: function() {
|
|
return this.name||"Chats In";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="chats-in">
|
|
<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>
|
|
<div class="form-row">
|
|
<label for="node-input-whatsappLink"><i class="fa fa-gear"></i> Client</label>
|
|
<input type="text" id="node-input-whatsappLink" placeholder="Name">
|
|
</div>
|
|
<div class="form-tips">
|
|
<p>Node will recive all whatsapp (personal and group) messages.</p>
|
|
</div>
|
|
</script>
|
|
|
|
|
|
<script type="text/markdown" data-help-name="chats-in">
|
|
Node to recive all messages send to connected number.
|
|
- Simply deploy the node and wait for connected (green) status.
|
|
- After succesfully connection, Node is able to recive all messages.
|
|
|
|
| Output | Description |
|
|
|--------|-------------|
|
|
| `msg.paylod` | Recived message |
|
|
| `msg.from` | Sender Number |
|
|
| `msg.chatID` | Chat ID of Group chat / Personal chat |
|
|
| `msg.message` | Complete message object. <br />*Some extra details for advance users* |
|
|
|
|
</script>
|