public void AlertSubscribers(NotificationEventType notificationType, long senderIndex) { _LogHelper.Log("FDS32432KJ", $"Start. Notification type {notificationType.ToString()} Sender index: {senderIndex}", LogLevel.Information, true); if (notificationType == NotificationEventType.OrderChange) { for (int i = QueueList.Count - 1; i > senderIndex; i--) { if (i != 0) { string notificationText = _localizationHelper.GetLocalizedString(StringToLocalize.OrderChangeAlert) .Replace("[QUEUEPOS]", i.ToString()) .Replace("[WAITTIME]", GetTimeToWait(QueueList[i].ChatId).ToString()); AlertSubscriber(QueueList[i].ChatId, notificationText); } } } else { for (int i = QueueList.Count - 1; i > senderIndex; i--) { string notificationText = _localizationHelper.GetLocalizedString(StringToLocalize.TimeChangeAlert) .Replace("[WAITTIME]", GetTimeToWait(QueueList[i].ChatId).ToString()); AlertSubscriber(QueueList[i].ChatId, notificationText); } } }