whatsapp-pi 1.0.29 → 1.0.30

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.29",
3
+ "version": "1.0.30",
4
4
  "type": "module",
5
5
  "description": "WhatsApp integration extension for Pi",
6
6
  "main": "whatsapp-pi.ts",
@@ -179,17 +179,17 @@ export class WhatsAppService {
179
179
  await this.sessionManager.markAuthStateAvailable();
180
180
  this.sessionManager.setStatus('connected');
181
181
  this.onStatusUpdate?.('| WhatsApp: Connected');
182
+
183
+ // Restore console methods now that connection is established
184
+ if (!this.verboseMode) {
185
+ console.log = originalConsoleLog;
186
+ console.warn = originalConsoleWarn;
187
+ console.error = originalConsoleError;
188
+ }
182
189
  }
183
190
  });
184
191
 
185
192
  this.socket.ev.on('messages.upsert', (m: any) => this.handleIncomingMessages(m));
186
-
187
- // Restore console methods after socket creation
188
- if (!this.verboseMode) {
189
- console.log = originalConsoleLog;
190
- console.warn = originalConsoleWarn;
191
- console.error = originalConsoleError;
192
- }
193
193
  }
194
194
 
195
195
  public async handleIncomingMessages(m: any) {