const usersSocket = require("../libs/socket");

export const removeUserFromOlineList = (userId: any) => {
  let index = usersSocket?.ob?.listOnline?.findIndex((o: any) => o?.id == userId);

  if (index != -1) {
    usersSocket?.ob?.listOnline?.splice(index, 1);
  }

  index = -1;

  index = usersSocket?.ob?.listOnlineAux?.findIndex((o: any) => o?.id == userId);

  if (index != -1) {
    usersSocket?.ob?.listOnlineAux?.splice(index, 1);
  }
};
