<commit_before>module Facebook
  module Messenger
    # The Bot module sends and receives messages.
    module Bot
      include HTTParty

      base_uri 'https://graph.facebook.com/v2.6/me'

      EVENTS = [:message, :delivery].freeze

      class << self
        # Deliver a message with the given payload.
        #
        # message - A Hash describing the recipient and the message*.
        #
        # * https://developers.facebook.com/docs/messenger-platform/send-api-reference#request
        #
        # Returns a String describing the message ID if the message was sent,
        # or raises an exception if it was not.
        def deliver(message)
          response = post '/messages', body: JSON.dump(message)

          raise_errors_from(response)

          response['message_id']
        end<commit_msg>Fix a bug that prevented registering post backs<commit_after>module Facebook
  module Messenger
    # The Bot module sends and receives messages.
    module Bot
      include HTTParty

      base_uri 'https://graph.facebook.com/v2.6/me'

      EVENTS = [:message, :delivery, :postback].freeze

      class << self
        # Deliver a message with the given payload.
        #
        # message - A Hash describing the recipient and the message*.
        #
        # * https://developers.facebook.com/docs/messenger-platform/send-api-reference#request
        #
        # Returns a String describing the message ID if the message was sent,
        # or raises an exception if it was not.
        def deliver(message)
          response = post '/messages', body: JSON.dump(message)

          raise_errors_from(response)

          response['message_id']
        end
{'fraction_non_alphanumeric': 0.08199643493761141, 'fraction_numerical': 0.0023767082590612004, 'mean_word_length': 2.232245681381958, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4527635', 'n_tokens_mistral': 447, 'n_tokens_neox': 431, 'n_words': 145}