Put back the [OpenStreetMap] prefix to the subject line of email
notifications of messages, but strip it again from any incoming
email replies.
def message_notification(message)
common_headers message.recipient
from_header message.sender.display_name, "m", message.id, message.digest
def message_notification(message)
common_headers message.recipient
from_header message.sender.display_name, "m", message.id, message.digest
+ subject I18n.t('notifier.message_notification.subject_header', :user => message.title, :locale => locale)
body :to_user => message.recipient.display_name,
:from_user => message.sender.display_name,
:body => message.body,
body :to_user => message.recipient.display_name,
:from_user => message.sender.display_name,
:body => message.body,
header: "{{from_user}} has commented on your recent OpenStreetMap diary entry with the subject {{subject}}:"
footer: "You can also read the comment at {{readurl}} and you can comment at {{commenturl}} or reply at {{replyurl}}"
message_notification:
header: "{{from_user}} has commented on your recent OpenStreetMap diary entry with the subject {{subject}}:"
footer: "You can also read the comment at {{readurl}} and you can comment at {{commenturl}} or reply at {{replyurl}}"
message_notification:
+ subject_header: "[OpenStreetMap] {{subject}}"
hi: "Hi {{to_user}},"
header: "{{from_user}} has sent you a message through OpenStreetMap with the subject {{subject}}:"
footer1: "You can also read the message at {{readurl}}"
hi: "Hi {{to_user}},"
header: "{{from_user}} has sent you a message through OpenStreetMap with the subject {{subject}}:"
footer1: "You can also read the message at {{readurl}}"
digest = message.digest
from = message.recipient
to = message.sender
digest = message.digest
from = message.recipient
to = message.sender
+ subject = message.subject.sub(/\[OpenStreetMap\] */, "")
end
exit 0 unless recipient[3] == digest[0,6]
end
exit 0 unless recipient[3] == digest[0,6]
message = Message.new(:sender => from, :recipient => to,
:sent_on => Time.now.getutc,
message = Message.new(:sender => from, :recipient => to,
:sent_on => Time.now.getutc,
- :title => mail.subject,
:body => mail.body)
message.save!
:body => mail.body)
message.save!