agentscope-ai / agentscope-ai/QwenPaw

[Feature]: Add official Zalo Bot channel support

Ouverte
#5,168 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
34.9k
Forks
3.1k
Merge moyen
1 j 15 h
PR mergées (30 j)
225

Description

Hi QwenPaw team,

Could you consider adding an official Zalo Bot channel?

Zalo is one of the most popular messaging platforms in Vietnam, similar to Telegram/WhatsApp for local users and businesses. Many Vietnamese users would like to connect QwenPaw agents to Zalo for daily assistant workflows.

## Current situation

QwenPaw already supports custom channels, and a custom Zalo channel can receive webhook events from the Zalo Bot API. In testing, webhook delivery works when using an HTTPS public endpoint.

However, implementing the complete channel reliably as a user-side custom channel is tricky:

- Zalo Bot API has different webhook/polling behavior.
- `getUpdates` cannot be used while a webhook is active.
- Webhook payload formats may vary.
- Message/session mapping and reply sending need first-class integration with QwenPaw.
- HTTPS webhook is likely required/recommended.
- Secret token support should be handled cleanly.

## Suggested implementation

Add a built-in `zalo` channel under QwenPaw channels.

Example config:

```json
{
"channels": {
"zalo": {
"enabled": true,
"bot_token": "...",
"webhook_url": "https://example.com/api/zalo/webhook",
"secret_token": "...",
"streaming_enabled": false,
"filter_tool_messages": true,
"filter_thinking": true
}
}
}
```

## Expected behavior

- Register `POST /api/zalo/webhook`.
- Verify secret token if configured.
- Parse Zalo message payloads robustly.
- Map user/chat IDs to QwenPaw sessions.
- Send assistant replies back through Zalo Bot API.
- Log webhook receive / ignored payload / send success / send failure clearly.
- Provide docs for setup on Zalo Bot Platform.

## Useful references

- Zalo Bot API base endpoint: `https://bot-api.zapps.me/bot/...`
- Common methods:
- `getMe`
- `setWebhook`
- `getWebhookInfo`
- `deleteWebhook`
- `getUpdates`
- send message endpoint, depending on Zalo Bot API docs
- Polling and webhook are mutually exclusive.

## Why this matters

Vietnamese users rely heavily on Zalo, and official Zalo channel support would make QwenPaw much more useful in Vietnam for personal assistants, small teams, and business workflows.

Thanks!

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.