node-red-contrib-whatsapp-link/groupRecipient.html

42 lines
1.8 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('groupRecipient', {
category: 'config',
defaults: {
name: {value: ""},
groupId: {value: "", required: true}
},
label: function() {
return this.name || this.groupId || "Group Recipient";
}
});
</script>
<script type="text/html" data-template-name="groupRecipient">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-groupId"><i class="fa fa-users"></i> Group ID</label>
<input type="text" id="node-config-input-groupId" placeholder="1234567890-1234567890">
</div>
<div class="form-tips">
<strong>Tip:</strong> Enter the WhatsApp group ID in the format NUMBER-TIMESTAMP (e.g., 1234567890-1234567890).
<br>You can find the group ID by sending a message to the group and checking the message metadata.
</div>
</script>
<script type="text/html" data-help-name="groupRecipient">
<p>Configuration node for a WhatsApp group recipient.</p>
<h3>Details</h3>
<p>This configuration node stores a group ID that can be reused across multiple group output nodes.</p>
<p>The group ID can be overridden at runtime by setting <code>msg.toNumber</code> in the flow.</p>
<h3>Configuration</h3>
<dl class="message-properties">
<dt>Name <span class="property-type">string</span></dt>
<dd>A friendly name to identify this group (optional).</dd>
<dt>Group ID <span class="property-type">string</span></dt>
<dd>The WhatsApp group ID in the format NUMBER-TIMESTAMP (contains a hyphen).</dd>
</dl>
</script>