Add regular notification level into topic_view_serializer for the user who enter the new topic

This commit is contained in:
Erick Guan 2014-05-06 16:24:12 +08:00
parent 8e5888dee1
commit a4aeb21f0c

View File

@ -92,6 +92,8 @@ class TopicViewSerializer < ApplicationSerializer
if has_topic_user?
result[:notification_level] = object.topic_user.notification_level
result[:notifications_reason_id] = object.topic_user.notifications_reason_id
else
result[:notification_level] = TopicUser.notification_levels[:regular]
end
result[:can_move_posts] = true if scope.can_move_posts?(object.topic)