@@ -396,7 +396,7 @@ module.exports = React.createClass({
396
396
} , ( err ) => {
397
397
modal . close ( ) ;
398
398
Modal . createDialog ( ErrorDialog , {
399
- title : _t ( 'Failed to reject invitation' ) ,
399
+ title : _t ( 'Failed to reject invitation' ) ,
400
400
description : err . toString ( ) ,
401
401
} ) ;
402
402
} ) ;
@@ -445,8 +445,8 @@ module.exports = React.createClass({
445
445
title : _t ( 'Create Room' ) ,
446
446
description : _t ( 'Room name (optional)' ) ,
447
447
button : _t ( 'Create Room' ) ,
448
- onFinished : ( should_create , name ) => {
449
- if ( should_create ) {
448
+ onFinished : ( shouldCreate , name ) => {
449
+ if ( shouldCreate ) {
450
450
const createOpts = { } ;
451
451
if ( name ) createOpts . name = name ;
452
452
createRoom ( { createOpts} ) . done ( ) ;
@@ -579,44 +579,44 @@ module.exports = React.createClass({
579
579
580
580
// switch view to the given room
581
581
//
582
- // @param {Object } room_info Object containing data about the room to be joined
583
- // @param {string= } room_info .room_id ID of the room to join. One of room_id or room_alias must be given.
584
- // @param {string= } room_info .room_alias Alias of the room to join. One of room_id or room_alias must be given.
585
- // @param {boolean= } room_info .auto_join If true, automatically attempt to join the room if not already a member.
586
- // @param {boolean= } room_info .show_settings Makes RoomView show the room settings dialog.
587
- // @param {string= } room_info .event_id ID of the event in this room to show: this will cause a switch to the
582
+ // @param {Object } roomInfo Object containing data about the room to be joined
583
+ // @param {string= } roomInfo .room_id ID of the room to join. One of room_id or room_alias must be given.
584
+ // @param {string= } roomInfo .room_alias Alias of the room to join. One of room_id or room_alias must be given.
585
+ // @param {boolean= } roomInfo .auto_join If true, automatically attempt to join the room if not already a member.
586
+ // @param {boolean= } roomInfo .show_settings Makes RoomView show the room settings dialog.
587
+ // @param {string= } roomInfo .event_id ID of the event in this room to show: this will cause a switch to the
588
588
// context of that particular event.
589
- // @param {Object= } room_info .third_party_invite Object containing data about the third party
589
+ // @param {Object= } roomInfo .third_party_invite Object containing data about the third party
590
590
// we received to join the room, if any.
591
- // @param {string= } room_info .third_party_invite.inviteSignUrl 3pid invite sign URL
592
- // @param {string= } room_info .third_party_invite.invitedEmail The email address the invite was sent to
593
- // @param {Object= } room_info .oob_data Object of additional data about the room
591
+ // @param {string= } roomInfo .third_party_invite.inviteSignUrl 3pid invite sign URL
592
+ // @param {string= } roomInfo .third_party_invite.invitedEmail The email address the invite was sent to
593
+ // @param {Object= } roomInfo .oob_data Object of additional data about the room
594
594
// that has been passed out-of-band (eg.
595
595
// room name and avatar from an invite email)
596
- _viewRoom : function ( room_info ) {
596
+ _viewRoom : function ( roomInfo ) {
597
597
this . focusComposer = true ;
598
598
599
599
const newState = {
600
- initialEventId : room_info . event_id ,
601
- highlightedEventId : room_info . event_id ,
600
+ initialEventId : roomInfo . event_id ,
601
+ highlightedEventId : roomInfo . event_id ,
602
602
initialEventPixelOffset : undefined ,
603
603
page_type : PageTypes . RoomView ,
604
- thirdPartyInvite : room_info . third_party_invite ,
605
- roomOobData : room_info . oob_data ,
606
- currentRoomAlias : room_info . room_alias ,
607
- autoJoin : room_info . auto_join ,
604
+ thirdPartyInvite : roomInfo . third_party_invite ,
605
+ roomOobData : roomInfo . oob_data ,
606
+ currentRoomAlias : roomInfo . room_alias ,
607
+ autoJoin : roomInfo . auto_join ,
608
608
} ;
609
609
610
- if ( ! room_info . room_alias ) {
611
- newState . currentRoomId = room_info . room_id ;
610
+ if ( ! roomInfo . room_alias ) {
611
+ newState . currentRoomId = roomInfo . room_id ;
612
612
}
613
613
614
614
// if we aren't given an explicit event id, look for one in the
615
615
// scrollStateMap.
616
616
//
617
617
// TODO: do this in RoomView rather than here
618
- if ( ! room_info . event_id && this . refs . loggedInView ) {
619
- const scrollState = this . refs . loggedInView . getScrollStateForRoom ( room_info . room_id ) ;
618
+ if ( ! roomInfo . event_id && this . refs . loggedInView ) {
619
+ const scrollState = this . refs . loggedInView . getScrollStateForRoom ( roomInfo . room_id ) ;
620
620
if ( scrollState ) {
621
621
newState . initialEventId = scrollState . focussedEvent ;
622
622
newState . initialEventPixelOffset = scrollState . pixelOffset ;
@@ -628,15 +628,15 @@ module.exports = React.createClass({
628
628
let waitFor = q ( null ) ;
629
629
if ( ! this . firstSyncComplete ) {
630
630
if ( ! this . firstSyncPromise ) {
631
- console . warn ( 'Cannot view a room before first sync. room_id:' , room_info . room_id ) ;
631
+ console . warn ( 'Cannot view a room before first sync. room_id:' , roomInfo . room_id ) ;
632
632
return ;
633
633
}
634
634
waitFor = this . firstSyncPromise . promise ;
635
635
}
636
636
637
637
waitFor . done ( ( ) => {
638
- let presentedId = room_info . room_alias || room_info . room_id ;
639
- const room = MatrixClientPeg . get ( ) . getRoom ( room_info . room_id ) ;
638
+ let presentedId = roomInfo . room_alias || roomInfo . room_id ;
639
+ const room = MatrixClientPeg . get ( ) . getRoom ( roomInfo . room_id ) ;
640
640
if ( room ) {
641
641
const theAlias = Rooms . getDisplayAliasForRoom ( room ) ;
642
642
if ( theAlias ) presentedId = theAlias ;
@@ -648,8 +648,8 @@ module.exports = React.createClass({
648
648
}
649
649
}
650
650
651
- if ( room_info . event_id ) {
652
- presentedId += "/" + room_info . event_id ;
651
+ if ( roomInfo . event_id ) {
652
+ presentedId += "/" + roomInfo . event_id ;
653
653
}
654
654
this . notifyNewScreen ( 'room/' + presentedId ) ;
655
655
newState . ready = true ;
@@ -663,7 +663,7 @@ module.exports = React.createClass({
663
663
title : _t ( 'Start a chat' ) ,
664
664
description : _t ( "Who would you like to communicate with?" ) ,
665
665
placeholder : _t ( "Email, name or matrix ID" ) ,
666
- button : _t ( "Start Chat" )
666
+ button : _t ( "Start Chat" ) ,
667
667
} ) ;
668
668
} ,
669
669
0 commit comments