<commit_before>module Streamable
  extend ActiveSupport::Concern

  included do
    has_one :stream_entry, as: :activity

    def title
      super
    end

    def content
      title
    end

    def target
      super
    end

    def object_type
      :activity
    end

    def thread
      super
    end

    after_create do
      self.account.stream_entries.create!(activity: self)
    end
  end
end<commit_msg>Don't generate stream entries for streamables of remote accounts<commit_after>module Streamable
  extend ActiveSupport::Concern

  included do
    has_one :stream_entry, as: :activity

    def title
      super
    end

    def content
      title
    end

    def target
      super
    end

    def object_type
      :activity
    end

    def thread
      super
    end

    after_create do
      self.account.stream_entries.create!(activity: self) if self.account.local?
    end
  end
end
{'fraction_non_alphanumeric': 0.041758241758241756, 'fraction_numerical': 0.0, 'mean_word_length': 2.1092150170648463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4497299', 'n_tokens_mistral': 275, 'n_tokens_neox': 257, 'n_words': 83}