Sha256: 93b865f2650ddb928005ca0abac4bbdb913b4c3c0d66222c1b52f1d84412be56
Contents?: true
Size: 882 Bytes
Versions: 12
Compression:
Stored size: 882 Bytes
Contents
# frozen_string_literal: true module Decidim module Messaging # A custom mailer for sending notifications to users when they receive # private messages class ConversationMailer < Decidim::ApplicationMailer include HasConversations private # rubocop:disable Metrics/ParameterLists def send_notification(from:, to:, conversation:, action:, message: nil, third_party: nil) with_user(to) do @organization = to.organization @conversation = conversation @sender = from @recipient = to @third_party = third_party @message = message @host = @organization.host subject = get_subject(action:, sender: @sender, third_party: @third_party) mail(to: to.email, subject:) end end # rubocop:enable Metrics/ParameterLists end end end
Version data entries
12 entries across 12 versions & 1 rubygems