2023-11-07 09:06:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class GroupUserWithCustomFieldsSerializer < UserWithCustomFieldsSerializer
|
|
|
|
include UserPrimaryGroupMixin
|
|
|
|
|
2024-02-26 08:40:48 -05:00
|
|
|
attributes :name, :title, :last_posted_at, :last_seen_at, :added_at, :timezone
|
|
|
|
|
|
|
|
def initialize(object, options = {})
|
|
|
|
super
|
|
|
|
options[:include_status] = true
|
|
|
|
end
|
2023-11-07 09:06:47 -05:00
|
|
|
|
|
|
|
def timezone
|
|
|
|
user.user_option.timezone
|
|
|
|
end
|
|
|
|
|
|
|
|
def include_added_at?
|
|
|
|
object.respond_to? :added_at
|
|
|
|
end
|
|
|
|
end
|