Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 4d8eada

Browse files
committed
Clarify comment
1 parent 59ee401 commit 4d8eada

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/stores/RoomViewStore.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,15 @@ class RoomViewStore extends Store {
249249
//
250250
// This flag remains true after the room has been sucessfully joined,
251251
// (this store doesn't listen for the appropriate member events)
252-
// so you should always consider the room to be joined if the user's
253-
// member events says they are joined.
252+
// so you should always observe the joined state from the member event
253+
// if a room object is present.
254254
// ie. The correct logic is:
255-
// if (room && myMember.membership == 'joined') {
256-
// // user is joined to the room
255+
// if (room) {
256+
// if (myMember.membership == 'joined') {
257+
// // user is joined to the room
258+
// } else {
259+
// // Not joined
260+
// }
257261
// } else {
258262
// if (RoomViewStore.isJoining()) {
259263
// // show spinner

0 commit comments

Comments
 (0)