This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
src/components/structures Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,6 @@ module.exports = React.createClass({
448
448
} ) ;
449
449
} , 0 ) ;
450
450
}
451
- this . notifyNewScreen ( 'user/' + payload . member . userId ) ;
452
451
break ;
453
452
case 'view_room' :
454
453
// Takes either a room ID or room alias: if switching to a room the client is already
@@ -1214,29 +1213,9 @@ module.exports = React.createClass({
1214
1213
return ;
1215
1214
}
1216
1215
1217
- // Get the member object for the current room, if a current room is set or
1218
- // we have a last_room in localStorage. The user might not be a member of
1219
- // this room (in which case member will be falsey).
1220
- let member ;
1221
- const roomId = this . state . currentRoomId || localStorage . getItem ( 'mx_last_room_id' ) ;
1222
- if ( roomId ) {
1223
- const room = MatrixClientPeg . get ( ) . getRoom ( roomId ) ;
1224
- if ( room ) {
1225
- member = room . getMember ( userId ) ;
1226
- }
1227
- }
1228
-
1229
- if ( member ) {
1230
- // This user is a member of this room, so view the room
1231
- dis . dispatch ( {
1232
- action : 'view_room' ,
1233
- room_id : roomId ,
1234
- } ) ;
1235
- } else {
1236
- // This user is not a member of this room, show the user view
1237
- member = new Matrix . RoomMember ( null , userId ) ;
1238
- this . _setPage ( PageTypes . UserView ) ;
1239
- }
1216
+ this . _setPage ( PageTypes . UserView ) ;
1217
+ this . notifyNewScreen ( 'user/' + userId ) ;
1218
+ const member = new Matrix . RoomMember ( null , userId ) ;
1240
1219
dis . dispatch ( {
1241
1220
action : 'view_user' ,
1242
1221
member : member ,
You can’t perform that action at this time.
0 commit comments