Sha256: 581e3aba91a6416bf56a32288a2b64c3a3f1d3c1c5b43466e3555ec068c8fd7f

Contents?: true

Size: 525 Bytes

Versions: 11

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true
module Thredded
  class TopicEmailView
    # @param [Thredded::TopicCommon] topic
    def initialize(topic)
      @topic = topic
    end

    def smtp_api_tag(tag)
      %({"category": ["thredded_#{@topic.private? ? 'private_topic' : @topic.messageboard.name}","#{tag}"]})
    end

    def subject
      "#{Thredded.email_outgoing_prefix} #{@topic.title}"
    end

    def reply_to
      Thredded.email_reply_to.call(@topic)
    end

    def no_reply
      Thredded.email_from
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
thredded-0.7.0 app/view_models/thredded/topic_email_view.rb
thredded-0.6.3 app/view_models/thredded/topic_email_view.rb
thredded-0.6.2 app/view_models/thredded/topic_email_view.rb
thredded-0.6.1 app/view_models/thredded/topic_email_view.rb
thredded-0.6.0 app/view_models/thredded/topic_email_view.rb
thredded-0.5.1 app/view_models/thredded/topic_email_view.rb
thredded-0.5.0 app/view_models/thredded/topic_email_view.rb
thredded-0.4.0 app/view_models/thredded/topic_email_view.rb
thredded-0.3.2 app/view_models/thredded/topic_email_view.rb
thredded-0.3.1 app/view_models/thredded/topic_email_view.rb
thredded-0.3.0 app/view_models/thredded/topic_email_view.rb