diff options
Diffstat (limited to 'users/app/models/message.rb')
-rw-r--r-- | users/app/models/message.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/users/app/models/message.rb b/users/app/models/message.rb index 7c05e06..424f094 100644 --- a/users/app/models/message.rb +++ b/users/app/models/message.rb @@ -17,7 +17,6 @@ class Message < CouchRest::Model::Base user_ids_to_show.delete(user.id) # is it necessary to keep track of what users have already seen it? user_ids_have_shown << user.id unless read_by?(user) - # TODO: is it quicker to call uniq! after adding rather than check if it is already included? end def read_by?(user) @@ -25,6 +24,6 @@ class Message < CouchRest::Model::Base end def unread_by?(user) - user_ids_to_shown.include?(user.id) + user_ids_to_show.include?(user.id) end end |