@wahooks/channel 0.6.0 → 0.6.1

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/dist/index.js +2 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -382,24 +382,8 @@ function connectWebSocket() {
382
382
  // Build message content for Claude
383
383
  let content = text;
384
384
  if (hasMedia && media?.url) {
385
- // Download media and convert to base64 for Claude to see
386
- try {
387
- const mediaRes = await fetch(media.url, {
388
- headers: { Authorization: `Bearer ${API_KEY}` },
389
- });
390
- if (mediaRes.ok) {
391
- const buf = Buffer.from(await mediaRes.arrayBuffer());
392
- const b64 = buf.toString("base64");
393
- const mime = media.mimetype ?? "image/jpeg";
394
- content = `${text ? text + "\n\n" : ""}[Media: ${mime}]\ndata:${mime};base64,${b64}`;
395
- }
396
- else {
397
- content = `${text ? text + "\n\n" : ""}[Media attached but could not be downloaded: ${media.mimetype ?? "unknown type"}]`;
398
- }
399
- }
400
- catch {
401
- content = `${text ? text + "\n\n" : ""}[Media attached: ${media?.mimetype ?? "unknown type"}]`;
402
- }
385
+ const mime = media.mimetype ?? "unknown";
386
+ content = `${text ? text + "\n\n" : ""}[Attached: ${mime}]\nDownload URL: ${media.url}`;
403
387
  }
404
388
  // Forward to Claude Code
405
389
  await mcp.notification({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wahooks/channel",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "WhatsApp channel for Claude Code — chat with Claude via WhatsApp",
5
5
  "type": "module",
6
6
  "bin": {