Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] User's Custom Status to be displayed in Direct Chat #20257

Conversation

aditya-mitra
Copy link
Contributor

@aditya-mitra aditya-mitra commented Jan 18, 2021

Proposed changes (including videos or screenshots)

In a 2-person direct message, the status of the other user could not be seen in the Header.
It has been fixed by fetching the user's status-text in a 2-person direct message room.

status can be seen

Issue(s)

Closes #20197

Steps to test or reproduce

Same as mentioned in #20197

Further comments

The status-text of the user (who you are chatting with in direct message) can be shown as the room topic.
Room Topics are unaffected by this change.

Displaying the status text in the header is more convenient than click on the user to find his/her status.

@aditya-mitra
Copy link
Contributor Author

@ggazzo Can you please review :D

@aditya-mitra aditya-mitra changed the title [FIX] User's Custom Statuses to be displayed in Direct Chat [FIX] User's Custom Status to be displayed in Direct Chat Jan 19, 2021
@wreiske
Copy link
Contributor

wreiske commented Jan 27, 2021

Is this reactive? E.g. if someone updates their status, does it update automatically or do you have to refresh the room?

@aditya-mitra
Copy link
Contributor Author

@wreiske
No, it's not reactive.
If the user updates his custom status, we have to manually refresh.

But, the his online/offline status is reactive.

I could not find an implementation of reactive user custom status text in the client folder.

@wreiske
Copy link
Contributor

wreiske commented Jan 27, 2021

My original implementation before the switch to react was reactive. I would say anywhere a status message shows (top of room, inside user popup, sidebar, etc.) It should be reactive and update when the user updates their status.

@aditya-mitra
Copy link
Contributor Author

@wreiske Can you please point out (or share) your implementation?
I would try to add that in react.

@wreiske
Copy link
Contributor

wreiske commented Jan 27, 2021

The original PRs:

#13933
#14853

Specifically the room headers: https://github.com/RocketChat/Rocket.Chat/pull/14853/files#diff-b200b9e23149e92470df6e0b1601a6b817f472d95764df95301388ed6c992df4

Thanks for your help @aditya-mitra !

@aditya-mitra
Copy link
Contributor Author

aditya-mitra commented Jan 27, 2021

@wreiske I made the user status text reactive!.

I used another hook function to get the live user status text.

I have also made a short video to demonstrate it working.

live-user-status-text-2.mp4

@aditya-mitra
Copy link
Contributor Author

@ggazzo Can you please review :D

@aditya-mitra
Copy link
Contributor Author

@ggazzo Are some more changes required?
I will do those as soon as possible.

@aditya-mitra
Copy link
Contributor Author

Closing this in favour of #20593 .

@aditya-mitra aditya-mitra deleted the aditya-mitra-dm-status-text branch March 22, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User's Custom Statuses no longer displayed in Direct Chat
2 participants