diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index ba1fdf0..1af4934 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -9,7 +9,8 @@ <% end %> <%= @showing_user.username %> - <% if @user %> + + <% if @user && @showing_user.is_active? %> (Send a Message) <% end %> diff --git a/script/mail_new_activity b/script/mail_new_activity index fc0ec36..96a48a9 100755 --- a/script/mail_new_activity +++ b/script/mail_new_activity @@ -44,7 +44,8 @@ EMAIL_WIDTH = 72 LAST_STORY_KEY = "mailing:last_story_id" LAST_COMMENT_KEY = "mailing:last_comment_id" -mailing_list_users = User.where(:mailing_list_enabled => true) +mailing_list_users = User.where(:mailing_list_enabled => true).select{|u| + u.is_active? } last_story_id = (Keystore.value_for(LAST_STORY_KEY) || Story.last.id).to_i diff --git a/script/parse_inbound_mail b/script/parse_inbound_mail index 7a22aa7..49ccf31 100755 --- a/script/parse_inbound_mail +++ b/script/parse_inbound_mail @@ -45,7 +45,7 @@ end sending_user = User.where(:mailing_list_enabled => true, :mailing_list_token => user_token).first -if !sending_user +if !sending_user || !sending_user.is_active? STDERR.puts "no user with mailing list token #{user_token}" # if this looks like a user token but invalid, generate a bounce to be