diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb
index c83fc59..b3bb90a 100644
--- a/app/views/comments/_comment.html.erb
+++ b/app/views/comments/_comment.html.erb
@@ -28,6 +28,7 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<%= comment.has_been_edited?? "edited" : "" %>
<%= raw(time_ago_in_words_label(comment.has_been_edited? ?
comment.updated_at : comment.created_at).gsub(/^about /, "")) %> ago
+ <%= comment.is_from_email?? "via e-mail" : "" %>
<% end %>
<% if !comment.previewing %>
diff --git a/db/migrate/20131228175805_add_comment_by_email_flag.rb b/db/migrate/20131228175805_add_comment_by_email_flag.rb
new file mode 100644
index 0000000..0c0de0d
--- /dev/null
+++ b/db/migrate/20131228175805_add_comment_by_email_flag.rb
@@ -0,0 +1,8 @@
+class AddCommentByEmailFlag < ActiveRecord::Migration
+ def up
+ add_column :comments, :is_from_email, :boolean, :default => false
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a61d8bd..c3925b8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20131018201413) do
+ActiveRecord::Schema.define(:version => 20131228175805) do
create_table "comments", :force => true do |t|
t.datetime "created_at", :null => false
@@ -28,6 +28,7 @@ ActiveRecord::Schema.define(:version => 20131018201413) do
t.text "markeddown_comment", :limit => 16777215
t.boolean "is_deleted", :default => false
t.boolean "is_moderated", :default => false
+ t.boolean "is_from_email", :default => false
end
add_index "comments", ["confidence"], :name => "confidence_idx"
diff --git a/script/parse_inbound_mail b/script/parse_inbound_mail
index 6447aae..c24dc92 100755
--- a/script/parse_inbound_mail
+++ b/script/parse_inbound_mail
@@ -134,6 +134,7 @@ body.strip!
c = Comment.new
c.user_id = sending_user.id
c.comment = body
+c.is_from_email = true
if parent.is_a?(Comment)
c.story_id = parent.story_id