Messages Settings (Live Chat)
Configure Pusher settings to enable real-time messaging between freelancers and clients on your platform.
Location: Dashboard → Messages → Settings
Overview
Deeplancer uses Pusher for real-time messaging functionality. Pusher enables instant message delivery, read receipts, and live conversation updates without page refreshes.
Getting Started with Pusher
Before configuring messages settings, you need a Pusher account.
-
Sign up for Pusher:
- Go to pusher.com
- Create a free account (includes 200,000 messages/day)
- Create a new app/channel
-
Get your Pusher credentials:
- App ID
- Key
- Secret
- Cluster (e.g.,
mt1, eu, ap-southeast-1)
Configuring Pusher Settings
Set up Pusher in your Deeplancer admin panel.
Location: Dashboard → Messages → Settings
- Go to Dashboard → Messages → Settings
- Fill in Pusher credentials:
- Pusher Key - Your Pusher app key
- Pusher App ID - Your Pusher application ID
- Pusher Secret - Your Pusher app secret
- Pusher Cluster - Your Pusher cluster (e.g.,
mt1, eu)
- Enable Encryption - Toggle to enable encrypted connections (recommended)
- Click "Save"
Pusher Clusters
Choose the cluster closest to your users for best performance.
Available Clusters:
mt1 - US East (N. Virginia) - Default
us2 - US West (Oregon)
us3 - US East (Ohio)
eu - EU (Ireland)
ap-southeast-1 - Asia Pacific (Singapore)
ap-southeast-2 - Asia Pacific (Sydney)
ap-northeast-1 - Asia Pacific (Tokyo)
How to choose:
- Most users in US →
mt1 or us2
- Most users in Europe →
eu
- Most users in Asia →
ap-southeast-1 or ap-northeast-1
Encryption
Enable Encryption provides secure, encrypted connections for all Pusher communications.
Benefits:
- Encrypts all message data in transit
- Prevents message interception
- Required for production environments
- Recommended for all deployments
When to enable:
- ✅ Always enable in production
- ✅ Enable if handling sensitive information
- ✅ Enable for compliance requirements (GDPR, etc.)
Pusher Free Tier
Pusher offers a free tier suitable for small to medium platforms.
Free Tier Limits:
- 200,000 messages per day
- 100 concurrent connections
- Unlimited channels
- All clusters available
Upgrade when:
- Exceeding 200,000 messages/day
- Need more than 100 concurrent connections
- Require dedicated support
Testing Live Chat
After configuring Pusher settings, test the live chat functionality.
-
Open two browser windows:
- Window 1: Log in as User A
- Window 2: Log in as User B
-
Start a conversation:
- User A sends a message to User B
- Message should appear instantly in User B's window
-
Test read receipts:
- User B reads the message
- User A should see read receipt (double checkmark)
-
Test real-time updates:
- Messages should appear without page refresh
- Sidebar should update with latest message preview
- Unread count should update automatically
Troubleshooting
Messages Not Appearing in Real-Time
Check:
- Pusher credentials are correct
- Pusher app is active (not paused)
- Browser console for errors
- Network tab for Pusher connections
Solutions:
- Verify Pusher Key, App ID, and Secret
- Check Pusher dashboard for app status
- Clear browser cache and reload
- Check browser console for JavaScript errors
Connection Errors
Common errors:
401 Unauthorized - Invalid Pusher credentials
403 Forbidden - App permissions issue
Connection timeout - Network or firewall issue
Solutions:
- Double-check Pusher credentials
- Verify app is not paused in Pusher dashboard
- Check firewall allows Pusher connections
- Try different cluster if timeout persists
Read Receipts Not Working
Check:
- Encryption is enabled (if required)
- User is authenticated
- Browser supports WebSockets
Solutions:
- Enable encryption in settings
- Ensure users are logged in
- Check browser WebSocket support
- Clear browser cache
High Pusher Usage
Monitor usage:
- Check Pusher dashboard for message count
- Review daily message statistics
- Identify high-traffic conversations
Optimize:
- Implement message rate limiting
- Use pagination for message history
- Optimize message payload size
- Consider upgrading Pusher plan
Security Best Practices
Secure Pusher Configuration:
- ✅ Always enable encryption
- ✅ Use HTTPS for your platform
- ✅ Keep Pusher Secret secure (never expose in frontend)
- ✅ Regularly rotate Pusher credentials
- ✅ Monitor Pusher dashboard for suspicious activity
Message Security:
- Messages are encrypted in transit
- User authentication required
- Private channels for conversations
- CSRF protection enabled
Advanced Configuration
Custom Pusher Options
For advanced users, you can customize Pusher configuration in config/broadcasting.php:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'useTLS' => true,
],
],
Environment Variables
You can also set Pusher credentials in .env file:
PUSHER_APP_ID=your_app_id
PUSHER_APP_KEY=your_app_key
PUSHER_APP_SECRET=your_app_secret
PUSHER_APP_CLUSTER=mt1
Note: Settings in admin panel override .env values.
Message Features
Once Pusher is configured, users can:
- Send real-time messages - Instant delivery
- Receive read receipts - See when messages are read
- View typing indicators - Know when someone is typing
- Get notifications - Browser notifications for new messages
- See online status - Know when users are online
- Quote messages - Reply to specific messages
- Share gigs - Send gig links in conversations
- Share buyer requests - Share project details
Support
Pusher Support:
Deeplancer Support:
- Check browser console for errors
- Review server logs
- Verify Pusher dashboard for connection status