@@ -33,7 +33,7 @@ function ProfileAvatarMenu() {
3333 useEffect ( ( ) => {
3434
3535 // Get User and update data
36- const user = mx . getUser ( mx . getUserId ( ) ) ;
36+ const user2 = mx . getUser ( mx . getUserId ( ) ) ;
3737
3838 // Set New User Status
3939 const onProfileUpdate = ( event = { } ) => {
@@ -42,7 +42,7 @@ function ProfileAvatarMenu() {
4242 const tinyEvent = event ;
4343 const eventJSON = JSON . stringify ( tinyEvent ) ;
4444
45- if ( eventJSON . length > 0 /* && (typeof user .presenceStatusMsg !== 'string' || user .presenceStatusMsg !== eventJSON) */ ) {
45+ if ( eventJSON . length > 0 /* && (typeof user2 .presenceStatusMsg !== 'string' || user2 .presenceStatusMsg !== eventJSON) */ ) {
4646
4747 let presenceStatus = 'online' ;
4848 if ( typeof tinyEvent . status === 'string' ) {
@@ -60,13 +60,13 @@ function ProfileAvatarMenu() {
6060 if ( customStatusRef && customStatusRef . current && typeof event . msg === 'string' && event . msg . length > 0 ) {
6161 customStatusRef . current . innerHTML = ReactDOMServer . renderToStaticMarkup ( twemojify ( event . msg . substring ( 0 , 100 ) ) ) ;
6262 } else {
63- customStatusRef . current . innerHTML = ReactDOMServer . renderToStaticMarkup ( twemojify ( user . userId ) ) ;
63+ customStatusRef . current . innerHTML = ReactDOMServer . renderToStaticMarkup ( twemojify ( user2 . userId ) ) ;
6464 }
6565
6666 if ( statusRef && statusRef . current && typeof event . status === 'string' && event . status . length > 0 ) {
6767 const tinyUser = mx . getUser ( mx . getUserId ( ) ) ;
6868 tinyUser . presenceStatusMsg = JSON . stringify ( event ) ;
69- statusRef . current . className = getUserStatus ( user ) ;
69+ statusRef . current . className = getUserStatus ( user2 ) ;
7070 }
7171
7272 }
@@ -88,10 +88,10 @@ function ProfileAvatarMenu() {
8888 } ) ;
8989
9090 // Socket
91- user . on ( 'User.avatarUrl' , onAvatarChange ) ;
91+ user2 . on ( 'User.avatarUrl' , onAvatarChange ) ;
9292 navigation . on ( cons . events . navigation . PROFILE_UPDATED , onProfileUpdate ) ;
9393 return ( ) => {
94- user . removeListener ( 'User.avatarUrl' , onAvatarChange ) ;
94+ user2 . removeListener ( 'User.avatarUrl' , onAvatarChange ) ;
9595 navigation . removeListener (
9696 cons . events . navigation . PROFILE_UPDATED ,
9797 onProfileUpdate ,
0 commit comments