!wip missing changes

pull/1959/head
tidusjar 7 years ago
parent 408a3b446d
commit 817c4f9ec1

@ -151,6 +151,10 @@ namespace Ombi.Notifications.Agents
protected override async Task IssueResolved(NotificationOptions model, EmailNotificationSettings settings)
{
if (!model.Recipient.HasValue())
{
return;
}
var message = await LoadTemplate(NotificationType.IssueResolved, model, settings);
if (message == null)
{
@ -161,10 +165,8 @@ namespace Ombi.Notifications.Agents
message.Other.Add("PlainTextBody", plaintext);
// Issues resolved should be sent to the user
message.To = model.RequestType == RequestType.Movie
? MovieRequest.RequestedUser.Email
: TvRequest.RequestedUser.Email;
message.To = model.Recipient;
await Send(message, settings);
}

@ -233,7 +233,7 @@ namespace Ombi.Controllers
{
var user = await _userManager.Users.Where(x => User.Identity.Name == x.UserName)
.FirstOrDefaultAsync();
var issue = await _issues.Find(model.IssueId);
var issue = await _issues.GetAll().Include(x => x.UserReported).FirstOrDefaultAsync(x => x.Id == model.IssueId);
if (issue == null)
{
return false;
@ -254,7 +254,8 @@ namespace Ombi.Controllers
? issue.UserReported.Email
: string.Empty,
AdditionalInformation = $"{issue.Subject} | {issue.Description}",
UserId = user.Id
UserId = user.Id,
};
AddIssueNotificationSubstitutes(notificationModel, issue);

Loading…
Cancel
Save