Commit 3cc70ed3 authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

Merge branch 'Topic/1126-enableHTMLEmail' into 'Product/1089-htmlEmail'

Topic/1126 enable html email

See merge request coscine/api/notification!9
parents 38e7c735 4596831e
......@@ -55,7 +55,6 @@ namespace Coscine.Api.NotificationBus.Controllers
private async Task SendNotifications(NotificationParameterObject notificationParameterObject)
{
List<User> users = GetUsers(notificationParameterObject.UserIds);
Project project = GetProject(notificationParameterObject.ProjectId);
var action = notificationParameterObject.Action;
ActionObject actionObject = _notificationConfiguration.GetAction(action);
......@@ -84,7 +83,7 @@ namespace Coscine.Api.NotificationBus.Controllers
}
// for every available user
foreach (User user in users)
foreach (User user in notificationParameterObject.Users)
{
JObject messageData = FillTemplate(channelName, actionObject, notificationParameterObject.Args, user, project);
......
using Newtonsoft.Json.Linq;
using Coscine.Database.DataModel;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -9,7 +10,7 @@ namespace Coscine.Api.NotificationBus
{
public class NotificationParameterObject
{
public List<string> UserIds { get; set; }
public List<User> Users { get; set; }
public string Action { get; set; }
......@@ -24,10 +25,10 @@ namespace Coscine.Api.NotificationBus
}
public NotificationParameterObject(string action, List<string> userIds, string projectId, JObject args, string href)
public NotificationParameterObject(string action, List<User> users, string projectId, JObject args, string href)
{
Action = action;
UserIds = userIds;
Users = users;
ProjectId = projectId;
Args = args;
Href = href;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment