whatsapp-pi 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/whatsapp-pi.ts +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-pi",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "WhatsApp integration extension for Pi",
6
6
  "main": "whatsapp-pi.ts",
package/whatsapp-pi.ts CHANGED
@@ -38,7 +38,7 @@ export default function(pi: ExtensionAPI) {
38
38
  // Initial status setup
39
39
  pi.on("session_start", async (_event, ctx) => {
40
40
  // Check verbose mode
41
- const isVerboseFlagSet = pi.getFlag("v") === true || pi.getFlag("verbose") === true || process.argv.includes("-v") || process.argv.includes("--verbose");
41
+ const isVerboseFlagSet = process.argv.includes("--verbose");
42
42
 
43
43
  const isVerbose = isVerboseFlagSet;
44
44
 
@@ -68,7 +68,7 @@ export default function(pi: ExtensionAPI) {
68
68
  }
69
69
 
70
70
  // Check whatsapp flag
71
- const isConnectFlagSet = pi.getFlag("w") === true || pi.getFlag("whatsapp") === true || process.argv.includes("-w") || process.argv.includes("--whatsapp");
71
+ const isConnectFlagSet = process.argv.includes("--whatsapp");
72
72
 
73
73
  // Auto-connect removed to avoid socket conflicts
74
74
  if (await sessionManager.isRegistered()) {
@@ -154,7 +154,7 @@ export default function(pi: ExtensionAPI) {
154
154
  await lastCommandCtx.newSession();
155
155
  } else {
156
156
  // Trigger the internal reset command to get a CommandContext
157
- pi.sendUserMessage("/whatsapp-internal-reset", { deliverAs: "followUp" });
157
+ pi.sendUserMessage("/internal-reset", { deliverAs: "followUp" });
158
158
  }
159
159
  return;
160
160
  }
@@ -164,7 +164,7 @@ export default function(pi: ExtensionAPI) {
164
164
  });
165
165
 
166
166
  // Internal command to trigger a real new session when we don't have a lastCommandCtx
167
- pi.registerCommand("whatsapp-internal-reset", {
167
+ pi.registerCommand("internal-reset", {
168
168
  description: "Internal WhatsApp session reset",
169
169
  handler: async (_args, ctx) => {
170
170
  lastCommandCtx = ctx;
@@ -180,7 +180,7 @@ export default function(pi: ExtensionAPI) {
180
180
  if (lastCommandCtx) {
181
181
  await lastCommandCtx.newSession();
182
182
  } else {
183
- pi.sendUserMessage("/whatsapp-internal-reset", { deliverAs: "followUp" });
183
+ pi.sendUserMessage("/internal-reset", { deliverAs: "followUp" });
184
184
  }
185
185
  return { action: "handled" };
186
186
  }