discourse/app/serializers/group_user_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
486 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2014-02-06 16:16:59 -06:00
class GroupUserSerializer < BasicUserSerializer
include UserPrimaryGroupMixin
attributes :name, :title, :last_posted_at, :last_seen_at, :added_at, :timezone, :status
def timezone
user.user_option.timezone
end
def include_added_at?
object.respond_to? :added_at
end
def include_status?
SiteSetting.enable_user_status && user.has_status?
end
def status
UserStatusSerializer.new(user.user_status, root: false)
end
2014-02-06 16:16:59 -06:00
end