node-red-contrib-whatsapp-link/whatsappAdmin.html
2022-12-17 15:05:04 +05:30

50 lines
1.9 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('whatsapp-admin',{
category: 'whatsapp',
color: '#25D366',
defaults: {
name: {value:"whatsapp-admin"},
whatsappLink: {value:"", type: "whatsappLink"}
},
outputs:1,
inputs:1,
icon: 'font-awesome/fa-comments',
label: function() {
return this.name||"Whatsapp Admin";
}
});
</script>
<script type="text/html" data-template-name="whatsapp-admin">
<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-admin">
Node used for Admin related tasks of whatsapp.
| Inputs | Description |
|--------|-------------- |
| test | Checks the current status of whatsapp and output the same in `msg.payload`|
| destroy| Close the client and destroy the connection.|
| restart | Restart the whatsapp client |
| logout | Simply log you out and close the session. |
| Output | Description |
|--------| ------------|
|`status` | provide status on `msg.payload` for all and each input mentioned in above table. |
| Connecting..| When whatsapp attempting to connect.
| QR Code (image) | when QR code is generated. *This method can also be used to get QR Code (image) generated by whatsapp.*
| Connected | When whatapp is sucessfully connected.|
| Group Joined or Removed | `msg.paylod` : Group Name. </br> `msg.type` : joined / Removed from group.</br> `msg.notification` : Complete notification. </br> `msg.chat` : Complete Group Details.
</script>