-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Initial users status not fetched #2663
Copy link
Copy link
Closed
Description
Description:
On app fresh install, the users initial presence status is not fetched (all users are in offline state). On presence update all works as expected.
Environment Information:
- Rocket.Chat Server Version: 3.8.0
- Rocket.Chat App Version: 4.12.1
- Device Name: iOS Simulator
- OS Version: iOS 14.2
Steps to reproduce:
- Open app and connect to a server
- All users not have correct presence status
Expected behavior:
Users have the correct presence status immediately.
Actual behavior:
Users are in offline state on app start.
Additional context:
This used to work in 4.11.0. I noticed that the cause may be the RoomItem component (fetch and update initial presence status ware done with useEffect on connected variable which was triggered on component mount and on connected prop change).
useEffect(() => {
if (connected && item.t === 'd' && id) {
getUserPresence(id);
}
}, [connected]);
Now you do this in componentDidUpdate, but to have the same behavior this should be done in componentDidMount too.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels