whatsapp-pi 1.0.37 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-pi",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "type": "module",
5
5
  "description": "WhatsApp integration extension for Pi",
6
6
  "main": "whatsapp-pi.ts",
@@ -107,7 +107,7 @@ export class MenuHandler {
107
107
 
108
108
  private async manageAllowedContact(ctx: ExtensionCommandContext, contact: Contact) {
109
109
  const displayName = this.formatAllowedContactOption(contact);
110
- const options = ['Send Message', 'History'];
110
+ const options = ['Send Message', 'History', 'Print Number'];
111
111
  if (contact.name) {
112
112
  options.push('Remove Alias');
113
113
  } else {
@@ -129,6 +129,12 @@ export class MenuHandler {
129
129
  return;
130
130
  }
131
131
 
132
+ if (choice === 'Print Number') {
133
+ ctx.ui.notify(contact.number, 'info');
134
+ await this.manageAllowedContact(ctx, contact);
135
+ return;
136
+ }
137
+
132
138
  if (choice === 'Add Alias') {
133
139
  const alias = await ctx.ui.input(`Enter alias for ${contact.number}:`);
134
140
  const trimmedAlias = alias?.trim() || '';