37 lines
1.3 KiB
HTML
37 lines
1.3 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('whatsapp-in',{
|
|
category: 'whatsapp',
|
|
color: '#25D366',
|
|
defaults: {
|
|
name: {value:"Chats In"},
|
|
whatsappLink: {value:"whatsapp-web", type:'whatsappLink'}
|
|
},
|
|
outputs:1,
|
|
icon: 'font-awesome/fa-commenting',
|
|
label: function() {
|
|
return this.name||"Whatsapp In";
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="whatsapp-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-tag"></i> Client</label>
|
|
<input type="text" id="node-input-whatsappLink" placeholder="Name">
|
|
</div>
|
|
</script>
|
|
|
|
|
|
<script type="text/markdown" data-help-name="whatsapp-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.
|
|
- Messages can be read at `msg.payload` and `msg.body` and sender number can be read at `msg.from`.
|
|
- Please look complete `{msg}` to get all details about recived message.
|
|
|
|
</script>
|