2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-02-06 17:16:59 -05:00
|
|
|
class GroupUserSerializer < BasicUserSerializer
|
2018-12-06 06:18:52 -05:00
|
|
|
include UserPrimaryGroupMixin
|
2024-02-26 08:40:48 -05:00
|
|
|
include UserStatusMixin
|
2018-12-06 06:18:52 -05:00
|
|
|
|
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
|
2022-12-14 04:18:09 -05:00
|
|
|
|
|
|
|
def timezone
|
|
|
|
user.user_option.timezone
|
|
|
|
end
|
2018-11-01 00:33:28 -04:00
|
|
|
|
2021-09-22 09:01:25 -04:00
|
|
|
def include_added_at?
|
2018-11-01 00:33:28 -04:00
|
|
|
object.respond_to? :added_at
|
|
|
|
end
|
2014-02-06 17:16:59 -05:00
|
|
|
end
|