public async Task UpdateLastTaskList(int iD, Database.Models.Task taskToSetToDone) { using (var scope = provider.CreateScope()) { if (cache.LastTaskListMessageIds.TryGetValue(iD, out (string messageId, string roomId, IMessageResponse response)found)) { if (found.response is TasklistMessageResponse tlr) { await Driver.UpdateMessageAsync(found.messageId, found.roomId, (new TaskListBuilder(scope.ServiceProvider.GetService <TaskContext>()).UpdateMessage(tlr) as TasklistMessageResponse)?.Message ?? "ERROR in TaskListMessage!!!"); } } } }
private string CreateDoneUrl(Database.Models.Task x, Database.Models.User user) => ResponseUrl + $"/users/{user.ID}/setDone/{x.ID}";
private string CreateTaskUrl(Database.Models.Task t) => $"{ResponseUrl}/tasks/{t.ID}";
public async Tasks.Task SendUnAssignedMessage(Database.Models.User user, Database.Models.Task task, Database.Models.User initiator) { await SendMessageToUser(user.ID, $"Your assignment to **Task {task.ID}**: {task.Title} has been removed."); }
public async Tasks.Task SendAssigneeMessage(Database.Models.User user, Database.Models.Task task, Database.Models.User initiator) { await SendMessageToUser(user.ID, $"You have ben assigned to **Task {task.ID}**: {task.Title}."); }