github aldinokemal/go-whatsapp-web-multidevice v7.7.0

14 hours ago

What's New in v7.7.0

🎨 Sticker Sending Support

  • Send Sticker API: New POST /send/sticker endpoint for sending WhatsApp stickers
    • Automatic Format Conversion: Converts images (JPG, PNG, GIF) to WebP format automatically
    • Multiple Input Methods: Support for both file upload and URL-based sticker sending
    • Image Validation: Validates image dimensions and format before conversion
    • Temporary File Management: Secure handling and cleanup of temporary sticker files
  • Sticker UI Component: New user-friendly interface for sending stickers via web UI
    • Drag & Drop Support: Easy sticker upload through drag and drop
    • URL Input: Send stickers directly from image URLs
    • Real-time Preview: Visual feedback during sticker preparation
    • Responsive Design: Mobile-friendly sticker sending interface

🤖 Enhanced MCP (Model Context Protocol) Tools

  • App Management Tools: Comprehensive connection management capabilities
    • Login QR/Code: Generate QR codes or pairing codes for WhatsApp Web login
    • Logout: Properly disconnect and cleanup WhatsApp sessions
    • Reconnect: Re-establish dropped connections automatically
    • Status Monitoring: Check current connection status and device information
  • Group Operations Suite: Full-featured group management tools
    • Create Groups: Programmatically create new WhatsApp groups
    • Join Groups: Accept group invitations via invite links
    • Leave Groups: Exit groups programmatically
    • Participants Management: List and manage group members
    • Group Settings: Configure group metadata and permissions
  • Query Functionality: Enhanced data retrieval capabilities
    • Chat Listing: Retrieve all active chats with metadata
    • Contact Listing: Access contact information programmatically
    • Message Retrieval: Fetch message history from specific chats
    • Structured Data: Well-organized JSON responses for easy integration

🐛 UI/UX Improvements

  • Chat Modal Navigation: Enhanced modal navigation and user experience
    • Close Button Fix: Fixed non-functional "Close" button on Chat List modal (#418)
    • Smooth Transitions: Improved navigation between Chat List and Chat Messages
    • Back Navigation: Added "Back to Chat List" button in Chat Messages view
    • Global Component Access: Better component exposure for easier integration
  • Modal Interaction Improvements
    • Fixed Callback Issue: Removed blocking onApprove: () => false callback
    • Maintained Functionality: "View Messages" and "X" close icon work as expected
    • Better User Flow: More intuitive modal opening and closing behavior

🎯 What This Means for You

For End Users

  • Express Yourself: Send custom stickers to enhance conversations
  • Easy Upload: Simple drag-and-drop or URL-based sticker sending
  • Better Navigation: Improved chat modal interactions and smoother user experience
  • Reliable Modals: Fixed UI bugs that prevented proper modal closing

For Developers & Integrators

  • New Sticker API: Programmatically send stickers with automatic format conversion
  • MCP Integration: Comprehensive AI agent integration via Model Context Protocol
  • Automated Workflows: Build bots and automation tools with new MCP capabilities
  • Connection Management: Better control over WhatsApp session lifecycle
  • Group Automation: Programmatically manage groups, members, and settings

For AI Agent Developers

  • Complete MCP Suite: 15+ new MCP tools for WhatsApp automation
  • Agent-Friendly: Structured interfaces designed for AI agent consumption
  • Session Control: Login, logout, reconnect, and monitor connections programmatically
  • Data Retrieval: Query chats, contacts, and messages for context-aware agents
  • Group Management: Full group administration capabilities for AI assistants

For Business Users

  • Sticker Marketing: Send branded stickers for marketing campaigns
  • Customer Engagement: Use stickers to enhance customer communication
  • Automated Groups: Programmatically create and manage business groups
  • Connection Monitoring: Track WhatsApp connection health and status

🛠️ New API Endpoints

Send Sticker (File Upload)

# Send sticker by uploading an image file
POST /send/sticker
Content-Type: multipart/form-data

# Form Data:
# - phone: 6281234567890 (recipient phone number)
# - sticker: <image_file> (JPG, PNG, GIF)

# Response
{
  "code": 200,
  "message": "Success send sticker",
  "results": {
    "message_id": "3EB0XXXXX",
    "status": "success"
  }
}

Send Sticker (URL)

# Send sticker from image URL
POST /send/sticker
Content-Type: application/json

{
  "phone": "6281234567890",
  "sticker": "https://example.com/images/sticker.png"
}

# Response
{
  "code": 200,
  "message": "Success send sticker",
  "results": {
    "message_id": "3EB0XXXXX",
    "status": "success"
  }
}

Usage Examples

// Send sticker from file upload
const formData = new FormData();
formData.append('phone', '6281234567890');
formData.append('sticker', fileInput.files[0]);

const response = await fetch('/send/sticker', {
  method: 'POST',
  body: formData
});

const data = await response.json();
console.log('Sticker sent:', data.results.message_id);

// Send sticker from URL
const response = await fetch('/send/sticker', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phone: '6281234567890',
    sticker: 'https://example.com/images/cool-sticker.png'
  })
});

🤖 MCP Tools Reference

App Management Tools

// whatsapp_login_qr - Generate QR code for WhatsApp Web login
// whatsapp_login_code - Generate pairing code for WhatsApp login
// whatsapp_logout - Disconnect and cleanup WhatsApp session
// whatsapp_reconnect - Re-establish dropped connection
// whatsapp_status - Check connection status and device info

Group Operations Tools

// whatsapp_create_group - Create a new WhatsApp group
// whatsapp_join_group - Join group via invite link
// whatsapp_leave_group - Leave a specific group
// whatsapp_list_group_participants - Get all group members
// whatsapp_update_group_settings - Configure group settings

Query Tools

// whatsapp_list_chats - Retrieve all active chats
// whatsapp_list_contacts - Get contact information
// whatsapp_get_messages - Fetch message history from chat

Send Tools

// whatsapp_send_message - Send text message
// whatsapp_send_sticker - Send sticker (NEW!)
// whatsapp_send_image - Send image with caption
// whatsapp_send_file - Send document/file
// whatsapp_send_video - Send video message
// whatsapp_send_audio - Send audio message
// whatsapp_send_location - Send location coordinates

🎨 Sticker Sending Features

Image Format Support

  • Input Formats: JPG, JPEG, PNG, GIF
  • Output Format: WebP (WhatsApp sticker format)
  • Automatic Conversion: FFmpeg-based conversion with optimal settings
  • Validation: Image dimension and format validation before processing

Input Methods

  1. File Upload: Direct file upload via multipart form data
  2. URL Input: Fetch image from external URL and convert
  3. UI Component: User-friendly web interface for sticker sending
  4. API Integration: Programmatic sticker sending via REST API

Processing Features

  • Temporary File Management: Secure handling of uploaded/downloaded images
  • Automatic Cleanup: Removes temporary files after processing
  • Error Handling: Comprehensive error messages for failed operations
  • Format Validation: Ensures only valid image formats are processed
  • Safe File Operations: Absolute path resolution for security

FFmpeg Conversion

# Automatic WebP conversion with optimal settings
ffmpeg -i input.jpg -vcodec libwebp -f webp \
       -lossless 1 -loop 0 -preset default \
       -an -vsync 0 output.webp

🐛 Bug Fixes

Modal Close Button Fix (#418, #419)

Problem: Chat List modal's "Close" button was non-functional due to blocking callback

// Before (broken)
onApprove: () => false  // Prevented modal from closing

Solution: Removed unnecessary blocking callback

// After (fixed)
// Removed onApprove callback, modal closes naturally

Impact:

  • ✅ "Close" button now works correctly
  • ✅ "View Messages" functionality preserved
  • ✅ "X" close icon continues to work
  • ✅ No regressions in other modal interactions

Modal Navigation Enhancement

Improvements:

  • Added closeModal() method to ChatList component
  • Implemented backToChatList() method in ChatMessages component
  • Exposed both components globally (window.ChatList, window.ChatMessages)
  • Added "Back to Chat List" button in Chat Messages view

User Experience Benefits:

  • Smooth transitions between Chat List and Chat Messages
  • Easy navigation back to Chat List without closing modal
  • Better modal state management
  • More intuitive user flow

💡 MCP Integration Guide

Setting Up MCP Server

# Run in MCP mode
cd src && go run . mcp

# Or using compiled binary
./whatsapp mcp

# With Docker
docker-compose up -d

MCP Configuration

{
  "mcpServers": {
    "whatsapp": {
      "command": "/path/to/whatsapp",
      "args": ["mcp"],
      "env": {
        "APP_PORT": "3000",
        "APP_ENVIRONMENT": "production"
      }
    }
  }
}

MCP Tool Categories

1. Connection Management

  • Login: Generate QR code or pairing code
  • Logout: Clean disconnect from WhatsApp
  • Reconnect: Automatic reconnection handling
  • Status: Monitor connection health

2. Messaging Operations

  • Send Messages: Text, stickers, images, videos, audio, files
  • Retrieve Messages: Fetch chat history and message details
  • Message Status: Track delivery and read receipts

3. Group Management

  • Create/Join/Leave: Full group lifecycle management
  • Participants: List and manage group members
  • Settings: Configure group name, description, permissions
  • Admin Operations: Promote/demote admins, change settings

4. Data Queries

  • Chats: List all active conversations
  • Contacts: Retrieve contact information
  • Groups: Access group metadata and participants
  • Messages: Query message history with filters

⚙️ Technical Details

Sticker Implementation

  • File Upload Handler: Multipart form data processing with validation
  • URL Download: Secure image fetching with timeout protection
  • WebP Conversion: FFmpeg integration with optimal compression settings
  • Error Recovery: Proper cleanup on conversion failures
  • Path Safety: Absolute path resolution prevents directory traversal

MCP Architecture

  • Handler Modules: Organized by functionality (app, group, query, send)
  • Tool Registration: Automatic tool discovery and registration
  • Error Handling: Comprehensive error responses with useful messages
  • Type Safety: Structured request/response types for all tools
  • Context Management: Proper context handling for async operations

UI Improvements

  • Component Lifecycle: Better modal mount/unmount handling
  • State Management: Improved modal state synchronization
  • Event Propagation: Fixed event handling in nested components
  • Global Exposure: Components accessible for advanced integrations

📊 Sticker Format Specifications

Image Requirements

  • Minimum Dimensions: 512x512 pixels (recommended)
  • Maximum File Size: 100KB (after WebP conversion)
  • Aspect Ratio: 1:1 (square) for optimal display
  • Supported Formats: JPG, JPEG, PNG, GIF (input)
  • Output Format: WebP with lossless compression

WebP Conversion Settings

  • Codec: libwebp
  • Quality: Lossless compression (lossless=1)
  • Loop: 0 (no animation, static sticker)
  • Preset: Default (balanced quality/speed)
  • Audio: Disabled (-an)
  • Vsync: 0 (passthrough timing)

🔧 Dependencies

New Requirements

  • FFmpeg: Required for sticker image conversion
    • Install: apt-get install ffmpeg (Linux)
    • Install: brew install ffmpeg (macOS)
    • Install: Download from ffmpeg.org (Windows)

MCP Dependencies

  • mark3labs/mcp-go: MCP server implementation
  • WhatsApp Session: Active WhatsApp connection required
  • JSON Support: For structured tool requests/responses

Important Notes

No Breaking Changes

  • All existing APIs continue to work unchanged
  • Backward compatible with previous versions
  • Existing functionality remains unaffected
  • MCP tools are additive, REST API unchanged

Enhanced Security

  • Temporary file cleanup prevents disk space leaks
  • Absolute path resolution prevents directory traversal
  • Input validation on all sticker requests
  • Secure URL fetching with timeout protection

FFmpeg Requirement

  • FFmpeg must be installed for sticker functionality
  • System PATH should include FFmpeg binary
  • Conversion fails gracefully with clear error messages
  • Other features work without FFmpeg installed

🔧 Recommended Actions

  • Install FFmpeg to enable sticker sending features
  • Update containers to benefit from UI bug fixes
  • Explore new MCP tools for AI agent integration
  • Test sticker sending with various image formats

💡 Use Cases

Sticker Marketing

  • Send branded stickers to customers
  • Seasonal promotional stickers
  • Product launch sticker campaigns
  • Customer engagement stickers

AI Agent Integration

  • Build conversational WhatsApp bots with MCP
  • Automated customer support agents
  • Group management automation
  • Message analysis and response agents

Business Automation

  • Automated group creation for projects
  • Customer onboarding workflows
  • Support ticket integration
  • CRM system integration via MCP tools

Developer Tools

  • WhatsApp testing and debugging
  • Integration testing with real WhatsApp
  • Prototyping WhatsApp features
  • API development and testing

Summary

Version 7.7.0 introduces exciting new capabilities for creative expression through sticker sending, comprehensive AI agent integration via MCP tools, and important UI/UX improvements. The new sticker API with automatic image conversion makes it easy to send custom stickers, while the extensive MCP tool suite enables powerful automation and AI agent integration.

The UI bug fixes ensure smooth modal navigation and better user experience, addressing long-standing usability issues. Combined with the new MCP tools for app management, group operations, and data queries, this release provides a solid foundation for building advanced WhatsApp automation and integration solutions.

Whether you're building marketing campaigns with stickers, developing AI-powered WhatsApp agents, or simply want better chat modal behavior, v7.7.0 delivers the functionality and fixes you need. The combination of creative features (stickers), technical capabilities (MCP tools), and quality improvements (UI fixes) makes this release a significant enhancement to the platform.

What's Changed

Full Changelog: v7.6.0...v7.7.0

Don't miss a new go-whatsapp-web-multidevice release

NewReleases is sending notifications on new releases.