Multiple webhooks, accessibility improvements, messages on the Realtime API, and more
Highlights
Multiple webhooks
You can now add multiple webhooks to your app. Webhooks can be useful as part of a chatbot interface, to inspect messages as they happen, or to trigger custom domain-specific actions.
To add a new webhook, go to the Settings page of your TalkJS dashboard, and select Add new webhook. Add your webhook URL, select the events that you’d like to subscribe to, and save your settings.
You can add up to three webhooks if you’re on the Growth plan or higher.
Accessibility improvements
Chat just got more accessible:
- Keyboard navigation: The scrollable area in the chatbox is now keyboard accessible. The area can get focus, so you can use your keyboard’s up and down arrow keys to scroll the container.
- Screen reader: If you’ve got a conversation in focus and someone sends a new message into that conversation, a screen reader will read out the new message.
Do you have more accessibility wishes for your chat? We’d love to hear from you! Get in touch.
Messages on the Realtime API
Messages are available on the Realtime API. That means that you can now access a continuous, up-to-date flow of data related to messages, without needing to send repeated requests or open a chat UI.
Version 0.31.0 of the JavaScript SDK adds the following:
- ConversationRef.message: Reference to a message in a given conversation.
- ConversationRef.subscribeMessages: Subscribe to the messages in a given conversation.
- MessageSubscription: Subscription to the messages in a given conversation.
- MessageRef: Reference to a message.
- MessageSnapshot.content: The main body of a given message. The body is a list of content blocks with entity trees, which means that you can render the message exactly as it would appear in the frontend.
- ReferencedMessageSnapshot: Snapshot of a message's attributes at a given moment in time.
- MessageSnapshot.referencedMessage: Snapshot of the message that the given message is a reply to, or null if this message is not a reply.
EditMessageParams
,SendMessageParams
, andMessageActiveState
.
Overview of other changes
Added
- JavaScript SDK (0.31.0): Added ConversationRef.send.
- JavaScript SDK (0.30.0): Added ConversationSnapshot.lastMessage.
- JavaScript SDK (0.29.0): Added ConversationRef.markAsRead and ConversationRef.markAsUnread
- JavaScript SDK (0.28.0): Added ParticipantRef to the Realtime API.
- JavaScript SDK (0.28.0): Added ConversationRef.participant to get a participant for a given conversation to the Realtime API.
- JavaScript SDK (0.28.0): Added ConversationSnapshot.joinedAt to the Realtime API.
- JavaScript SDK (0.27.0): Added ConversationRef.set and ConversationRef.createIfNotExists to the Realtime API.
- Added the option to mark conversations as read or unread to the Realtime API.
- Flutter SDK (0.14.0): Added the onUnreadsChange property to Session.
Changed
- React SDK (0.1.10): Allow
null
as a value for theconversationId
prop. - Changed the options for @mentioning a user. Only users who are a current participant in a conversation can be mentioned in that conversation. You can no longer mention guest users.
Deprecated
- Flutter SDK (0.14.0): Deprecated the
unreads
property of Session.
Fixed
- Fixed a bug in Realtime API batching, where in some cases calls would be executed out-of-order.
- Fixed an issue where the main chat would scroll down when you scrolled in a message search.
- Fixed a bug where a participant who had been removed from a conversation could still be @mentioned in that conversation.
New guides and tutorials
👋 Thoughts? Questions? Get in touch.
✨Follow TalkJS on 𝕏 and LinkedIn to stay up to date.
👩🏾💻We’re hiring! Check out our jobs page.