Skip to content

Commit

Permalink
Don't show deleted messages in unread message count
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan Finn authored and Aidan Finn committed Mar 8, 2011
1 parent 7461f5a commit b3f5d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/has_private_messages_extensions.rb
Expand Up @@ -48,7 +48,7 @@ def unread_messages?

# Returns the number of unread messages for this user
def unread_message_count
eval options[:class_name] + '.count(:conditions => ["recipient_id = ? AND read_at IS NULL", self])'
eval options[:class_name] + '.count(:conditions => ["recipient_id = ? AND read_at IS NULL and recipient_deleted = ?", self, false])'
end
end
end
Expand Down

0 comments on commit b3f5d03

Please sign in to comment.