mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
!wip missing changes
This commit is contained in:
parent
408a3b446d
commit
817c4f9ec1
2 changed files with 9 additions and 6 deletions
|
@ -151,6 +151,10 @@ namespace Ombi.Notifications.Agents
|
||||||
|
|
||||||
protected override async Task IssueResolved(NotificationOptions model, EmailNotificationSettings settings)
|
protected override async Task IssueResolved(NotificationOptions model, EmailNotificationSettings settings)
|
||||||
{
|
{
|
||||||
|
if (!model.Recipient.HasValue())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
var message = await LoadTemplate(NotificationType.IssueResolved, model, settings);
|
var message = await LoadTemplate(NotificationType.IssueResolved, model, settings);
|
||||||
if (message == null)
|
if (message == null)
|
||||||
{
|
{
|
||||||
|
@ -161,9 +165,7 @@ namespace Ombi.Notifications.Agents
|
||||||
message.Other.Add("PlainTextBody", plaintext);
|
message.Other.Add("PlainTextBody", plaintext);
|
||||||
|
|
||||||
// Issues resolved should be sent to the user
|
// Issues resolved should be sent to the user
|
||||||
message.To = model.RequestType == RequestType.Movie
|
message.To = model.Recipient;
|
||||||
? MovieRequest.RequestedUser.Email
|
|
||||||
: TvRequest.RequestedUser.Email;
|
|
||||||
|
|
||||||
await Send(message, settings);
|
await Send(message, settings);
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ namespace Ombi.Controllers
|
||||||
{
|
{
|
||||||
var user = await _userManager.Users.Where(x => User.Identity.Name == x.UserName)
|
var user = await _userManager.Users.Where(x => User.Identity.Name == x.UserName)
|
||||||
.FirstOrDefaultAsync();
|
.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)
|
if (issue == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -254,7 +254,8 @@ namespace Ombi.Controllers
|
||||||
? issue.UserReported.Email
|
? issue.UserReported.Email
|
||||||
: string.Empty,
|
: string.Empty,
|
||||||
AdditionalInformation = $"{issue.Subject} | {issue.Description}",
|
AdditionalInformation = $"{issue.Subject} | {issue.Description}",
|
||||||
UserId = user.Id
|
UserId = user.Id,
|
||||||
|
|
||||||
};
|
};
|
||||||
AddIssueNotificationSubstitutes(notificationModel, issue);
|
AddIssueNotificationSubstitutes(notificationModel, issue);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue