Mobile SDKs: videos, voice messages and edited or recalled messages; @hatang/sdk 0.7.0
Customers can send videos and voice messages from the website widget and the mobile SDKs, and a message the team edits, recalls or removes a file from now changes in place in the customer's chat. @hatang/sdk 0.7.0 adds spam controls for received mail and resending an e-invoice email.
| SDK | Release | What changed |
|---|---|---|
| React Native | @hatang/chat-react-native 0.5.0, 0.5.1 | Videos with the optional peer expo-video, voice messages with expo-audio, the messageUpdated event; on iOS the mic needs the microphone declared (voiceMessages, or read from the Expo config through expo-constants). Guide |
| Flutter | hatang_chat 0.7.0, 0.7.1 | Videos and voice messages (new dependencies video_player and record), HatangMessageUpdated; recording on iOS and macOS is opt-in with voiceMessages: true. Breaking for apps that build HatangChatStrings by hand. Guide |
| iOS | HatangChat 0.5.0, 0.5.1 | Videos compressed on the device to fit 25 MB, voice messages, HatangEvent.messageUpdated(MessageDto); the mic only shows when the app declares NSMicrophoneUsageDescription. Guide |
| Android | dev.hatang:chat 0.5.0 | Videos, voice messages, HatangMessageUpdated(message); the library's manifest now declares RECORD_AUDIO. Guide |
| Node.js | @hatang/sdk 0.7.0 | emails.receiving.notSpam, trusted_senders on domains, einvoices.sendEmail. Guide |
Videos and voice messages
- Customers send mp4 or .mov videos of up to 25 MB (other files stay at 10 MB). Videos play in the chat.
- When the website's Let customers send voice messages setting is on (the default), the send button becomes a mic while the text box is empty. A recording lasts at most 2 minutes. Agents see a player with an automatic transcript; the customer does not see the transcript, and the AI assistant answers from it.
- iOS ends an app that records without
NSMicrophoneUsageDescription, so each SDK hides the mic until the app can record safely. Check your SDK's guide before you upgrade a store build.
Edited, recalled and trimmed messages
Agents can now edit their replies, recall a message on web chat (and Telegram and personal Zalo), and remove one file from a message they sent. The gateway sends the same message id again; the SDKs replace the bubble, show "edited" or "Message recalled", and emit a new event instead of a second "message received". On a website, the widget fires message:updated. An exhaustive switch or when over the SDK's event type needs the new case.