public async Task Send(RoutedNotification notification) { var channelId = await _channels.Get(notification.Target); if (channelId.Succeeded() && channelId.Content.HasValue) { await _post.Post(new SlackMessage { Channel = channelId.Content.Value.Id, Text = notification.Text, }); } }
public async Task Send(RoutedNotification notification) { var userId = await _users.Get(notification.Target); if (userId.Succeeded() && userId.Content.HasValue) { await _post.Post(new SlackMessage { Channel = userId.Content.Value.Id, Title = notification.Title, Text = notification.Text, }); } }