lukejacksonn / react-slack-clone

Complete chat application, built with Chatkit | by @lukejacksonn

Home Page:https://pusher.com/chatkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom status message

bookercodes opened this issue · comments

On WhatsApp, Skype, Slack, etc. it's possible for each user to set their online status. This is a pretty common use-case and I would love to see how to do it with Chatkit.

Maybe in user header or in user list add a simple little input box with a drop down menu for various statuses? Need to save the value for that however and slightly unfamiller in how react saves form data

Would you need to create a 'status' property in the User class in user.js from the Chatkit and a setStatus method on the user? This will then be returned to the application from the Chatkit and you could display it under the user id in UserHeader.

Both of you are on the right tracks! @Leschonander the UserHeader would be a great place to put a custom status drop down but as @fejj182 points out, you would need to store this status on the server so that all other connected clients could observe it.

This is a limitation of the Chatkit library at the moment but I believe work is being planned that will allow you to attach arbitrary metadata to message, room and user objects.

Knowing the features in most demand helps us decide which to implement next, so thanks for showing an interest here!