Skip to content

Commit

Permalink
Delete old notification format
Browse files Browse the repository at this point in the history
  • Loading branch information
wh0o7 committed Sep 11, 2023
1 parent a7894c4 commit 05ada56
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions TeachersTimetable/Services/ParseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,8 @@ public async Task ParseDay()
teacherUpdatedList.Add(teacherInfo.Name);
try
{
_ = this._botService.SendAdminMessageAsync(
new SendMessageArgs(0, $"Расписание у группы {teacherInfo.Name}"));

var userList = (await this._mongoService.Database.GetCollection<User>("Users")
.FindAsync(u => u.Teacher != null && u.Notifications && u.Teacher == teacherInfo.Name)).ToList();

notificationUsersList.AddRange(userList);
}
catch (Exception e)
Expand All @@ -296,6 +292,7 @@ public async Task ParseDay()
if (teacherUpdatedList.Count != 0)
_ = this._botService.SendAdminMessageAsync(new SendMessageArgs(0,
$"There's been a schedule change with the teachers: {string.Join(',', teacherUpdatedList)}"));
teacherUpdatedList.Clear();
Timetable.Clear();
Timetable.Add(new()
{
Expand Down

0 comments on commit 05ada56

Please sign in to comment.