Skip to content

Commit

Permalink
Merge pull request #218 from jodrell2000/stableDev
Browse files Browse the repository at this point in the history
Stable dev
  • Loading branch information
jodrell2000 authored Aug 11, 2022
2 parents a786ae2 + 5c40519 commit ee5e0ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/userModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,10 @@ const userFunctions = ( bot ) => {
//adds users who join the room to the user list if their not already on the list
this.addUserToTheUsersList( userID, username );

// if they;ve previously been in the room as a guest we won't have their name
// best update it from the raw data that was passed into this function to be sure
this.updateUsername( userID, username );

//starts time for everyone that joins the room
this.addUserJoinedTime( userID );

Expand All @@ -1729,6 +1733,12 @@ const userFunctions = ( bot ) => {
this.addUserIsHere( userID );
},

updateUsername: function ( userID, username ) {
if ( this.userExists( userID ) ) {
this.storeUserData( userID, "username", username );
}
},

isUserHere: function ( userID ) {
if ( this.userExists( userID ) ) {
return theUsersList[ this.getPositionOnUsersList( userID ) ][ 'here' ];
Expand Down

0 comments on commit ee5e0ce

Please sign in to comment.