function ioListenerSocketLeftRoom(payload) {
		const { leftRoomName, situation } = payload;
		//console.log("Removing Room from state:", leftRoomName);
		// Remove room from state
		removeRoomFromState(leftRoomName);
		removeUnreadMessageCountFromState(leftRoomName);

		// currentRoom was deleted, return to default room
		if (selectedRoomObj.name === leftRoomName) {
			setSelectedRoomObj(roomObjMap.values().next().value);
			disableOverlay();
		}

		// Set up notification depending on situation
		if (situation.roomDeleted) setNotificationClipDetails({ active: true, message: `${leftRoomName} was deleted` });
		else if (situation.leftRoom) setNotificationClipDetails({ active: true, message: `Left ${leftRoomName}` });
	}
/**
	 * Listener function when this socket leaves a room he is part of,
	 * may not always be done by ownself (ex: room owner deletes the room, while user in other room)
	 * @param {Object} payload
	 */
Listener function when this socket leaves a room he is part of,
may not always be done by ownself (ex: room owner deletes the room, while user in other room)
@param {Object} payload
Listener function when this socket leaves a room he is part of may not always be done by ownself ( ex : room owner deletes the room while user in other room ) @param { Object } payload
function ioListenerSocketLeftRoom(payload) {
		const { leftRoomName, situation } = payload;
		removeRoomFromState(leftRoomName);
		removeUnreadMessageCountFromState(leftRoomName);
		if (selectedRoomObj.name === leftRoomName) {
			setSelectedRoomObj(roomObjMap.values().next().value);
			disableOverlay();
		}
		if (situation.roomDeleted) setNotificationClipDetails({ active: true, message: `${leftRoomName} was deleted` });
		else if (situation.leftRoom) setNotificationClipDetails({ active: true, message: `Left ${leftRoomName}` });
	}
function ioListenerSocketLeftRoom ( payload ) { const { leftRoomName , situation } = payload ; removeRoomFromState ( leftRoomName ) ; removeUnreadMessageCountFromState ( leftRoomName ) ; if ( selectedRoomObj . name === leftRoomName ) { setSelectedRoomObj ( roomObjMap . values ( ) . next ( ) . value ) ; disableOverlay ( ) ; } if ( situation . roomDeleted ) setNotificationClipDetails ( { active : true , message : ` ${ leftRoomName } ` } ) ; else if ( situation . leftRoom ) setNotificationClipDetails ( { active : true , message : ` ${ leftRoomName } ` } ) ; }
Listener function when this socket leaves a room he is part of,
 may not always be done by ownself (ex: room owner deletes the room, while user in other room)
 @param {Object} payload
Listener function when this socket leaves a room he is part of may not always be done by ownself ( ex : room owner deletes the room while user in other room ) @param { Object } payload
//console.log("Removing Room from state:", leftRoomName); // Remove room from state // currentRoom was deleted, return to default room // Set up notification depending on situation