<commit_before>module SlackService
  extend self

  def post_hangout_notification(hangout)
    return unless Features.enabled?(:slack_notifications)

    uri = URI.parse "#{Slack::BOT_URL}/hubot/hangouts-notify"
    Net::HTTP.post_form uri, {
      title: hangout.title,
      link: hangout.hangout_url,
      type: hangout.category
    }
  end
end<commit_msg>Added Support for Host in SlackService<commit_after>module SlackService
  extend self

  def post_hangout_notification(hangout)
    return unless Features.enabled?(:slack_notifications)

    uri = URI.parse "#{Slack::BOT_URL}/hubot/hangouts-notify"
    Net::HTTP.post_form uri, {
      title: hangout.title,
      link: hangout.hangout_url,
      type: hangout.category,
      host_name: hangout.user.display_name,
      host_avatar: avatar_url(hangout.user)
    }
  end

  private

  def avatar_url(user)
    hash = Digest::MD5::hexdigest(user.email.strip.downcase)
    "https://www.gravatar.com/avatar/#{hash}"
  end
end
{'fraction_non_alphanumeric': 0.10692464358452139, 'fraction_numerical': 0.0010183299389002036, 'mean_word_length': 3.7259615384615383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2735222', 'n_tokens_mistral': 340, 'n_tokens_neox': 330, 'n_words': 59}