예제 #1
0
        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,
                });
            }
        }
예제 #2
0
        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,
                });
            }
        }