channelManager now tracks all active connectedUser objects for a given user.

This commit is contained in:
rainbow napkin 2025-09-17 05:11:45 -04:00
parent 261dce7b29
commit 6222535c47
7 changed files with 160 additions and 24 deletions

View file

@ -91,6 +91,7 @@ class connectedUser{
* @param {Mongoose.Document} userDB - User Document Passthrough to save on DB Access
* @param {Mongoose.Document} chanDB - Channnel Document Passthrough to save on DB Access
* @param {Socket} socket - Requesting Socket
* @returns {activeUser} active user object generated by the new connection
*/
async handleConnection(userDB, chanDB, socket){
//send metadata to client
@ -115,6 +116,10 @@ class connectedUser{
//Tattoo hashed IP address to user account for seven days
await userDB.tattooIPRecord(socket.handshake.address);
}
//Return active user object for use by activeChannel and channelManager objects
return this;
}
/**