I hope you’re doing well.
I’ve been using Cockpit for quite some time now, and it’s being used live for various pages. I really enjoy Cockpit for it’s simplicity and the ability to expand it’s capabilities according to what you need.
However, there’s one feature which gets more and more common on modern company pages. And that’s a live support chat window.
I think this is something that could be developed by the community in the form of an addon for Cockpit. I’d do just that, but PHP just isn’t my thing.
But if my idea is something that will eventually be developed, I’d immediatly develop a frontend component, Vue based or vanilla JS, for you to use.
Opens at click of the second column (text content) of either a pending or a handled request.
|Method||Endpoint||Params / Headers||Description|
|POST||/api/chat/sendMessage||Authorization, MessageBody, RequestID (optional)||Allows the user to send a message. If it’s the first message in the conversation, a new Request gets generated. The used receives the Request ID in the API response so he can send more messages and get answers to that specific chat.|
|GET||/api/chat/getMessages||Authorization, RequestID||User receives Array of Objects. Each object is a chat message and contains params such as
RequestID Parameter has to be a non-guessable string (high length, random chars, not countable, …) because if the Request ID is guessable, other random users could hijack the chat.
- I think this feature would be really nice to have, especially for using it on company websites
- I’d absolutely be down to code a MIT licensed frontend component for it
Have a nice day everyone! 🚀