Inspired by Christian Stuff's talk at CommCon21.
- Non-persistent chat for privacy and HIPAA compliance
- New users receive the chat history automatically when they join
- When the session ends, chat history is gone
The API provides chat history with chatClient.getMessages()
, but we're not using that.
Running on codesandbox.io with API credentials. The example back-end on the SignalWire docs doesn't seem to work -- fork the codesandbox project and set the URL as an env variable.
Run vite
to run the app in development, or vite build
to build it. In the UI, insert a user name and join the chat. If there are other users in the room, the app will poll a random participant, who will broadcast their chat history object to all participants. This way, all participants always see the same history.
The whole chat history exists as a state variable in the participants' front-ends. When the last participant leaves the room, all history is gone.
video.-.non-persistent.chat.mp4
GNU LGPLv3