public async void SkipOrDequeue(long chatId) { var tempIndex = QueueList.IndexOf(QueueList.FirstOrDefault(x => x.ChatId == chatId)); _LogHelper.Log("FDS9FDJ23J423K", $"About to decide (SkipOrDequeue) for index {tempIndex} and chatId {chatId}", LogLevel.Trace, true); if (QueueList.Last().ChatId == chatId || QueueList[tempIndex].FailedAttempts == 1) { _LogHelper.Log("LKN5LK43N543V5CX", "Will dequeue", chatId, LogLevel.Trace); string notificationText = _localizationHelper.GetLocalizedString(StringToLocalize.InactivityDequeueAlert); AlertSubscriber(chatId, notificationText); await _menuLoader.LoadStateMenu(chatId, UserState.InMainMenu); DequeueId(chatId); } else { _LogHelper.Log("43hjh432j4h2klk", $"Will skip. tempindex = {tempIndex}", chatId, LogLevel.Trace); ++QueueList[tempIndex].FailedAttempts; var temp = QueueList[tempIndex]; QueueList[tempIndex] = QueueList[tempIndex + 1]; QueueList[tempIndex + 1] = temp; if (tempIndex == 0) { ProcessUserInBetweenQueueAndRoom(); string notificationText = _localizationHelper.GetLocalizedString(StringToLocalize.SkipFirstAlert) .Replace("[QUEUEPOS]", (tempIndex + 1).ToString()) .Replace("[WAITTIME]", GetTimeToWait(QueueList[tempIndex + 1].ChatId).ToString()); AlertSubscriber(QueueList[tempIndex + 1].ChatId, notificationText); _menuLoader.LoadStateMenu(chatId, UserState.InQueue); } else { string notificationText = _localizationHelper.GetLocalizedString(StringToLocalize.SkipOtherAlert) .Replace("[QUEUEPOS]", tempIndex.ToString()) .Replace("[WAITTIME]", GetTimeToWait(QueueList[tempIndex].ChatId).ToString()); AlertSubscriber(QueueList[tempIndex].ChatId, notificationText); //_menuLoader.LoadStateMenu(chatId, UserState.InQueue); } } }