Permalink
Browse files

Don't show deleted messages in unread message count

  • Loading branch information...
1 parent 7461f5a commit b3f5d03b8bd77664dc16d41e4c4e96c9d9856b6e Aidan Finn committed Mar 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/has_private_messages_extensions.rb
@@ -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

0 comments on commit b3f5d03

Please sign in to comment.