Exemple #1
0
        private void JoinUser(string userId, string channelId)
        {
            _coffeeRepository.AddToRoster(userId);
            _userRepository.AddUser(userId);

            string text = string.Format(DougMessages.JoinedCoffee, Utils.UserMention(userId));

            _slack.SendMessage(text, channelId);
        }
Exemple #2
0
        public void CoffeeRemind(string ChannelId)
        {
            var readyParticipants   = _coffeeRepository.GetReadyParticipants();
            var missingParticipants = _coffeeRepository.GetMissingParticipants();

            var total = missingParticipants.Count + readyParticipants.Count;

            var userMentionList = missingParticipants
                                  .Select(userId => Utils.UserMention(userId))
                                  .Aggregate(string.Empty, (userId, acc) => acc + " " + userId);

            _slack.SendMessage(string.Format(DougMessages.Remind, readyParticipants.Count, total, userMentionList), ChannelId);
        }