diff options
author | 2025-02-04 16:52:42 +0100 | |
---|---|---|
committer | 2025-02-04 16:52:42 +0100 | |
commit | 07d27709957248008c61d6b8d553e3d2eb14d154 (patch) | |
tree | d054e92729708e275886100492a458d633fbaa59 /internal/typeutils | |
parent | adds support for build specifically without wasm ffmpeg (#3732) (diff) | |
download | gotosocial-07d27709957248008c61d6b8d553e3d2eb14d154.tar.xz |
[feature] Change `instance-stats-randomize` to `instance-stats-mode` with multiple options; implement nodeinfo 2.1 (#3734)
* [feature] Change `instance-stats-randomize` to `instance-stats-mode` with multiple options; implement nodeinfo 2.1
* swaggalaggadingdong
Diffstat (limited to 'internal/typeutils')
-rw-r--r-- | internal/typeutils/internaltofrontend.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index d966c054c..8375a8c3a 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -1745,9 +1745,9 @@ func (c *Converter) InstanceToAPIV1Instance(ctx context.Context, i *gtsmodel.Ins stats["domain_count"] = util.Ptr(domainCount) instance.Stats = stats - if config.GetInstanceStatsRandomize() { - // Whack some random stats on the instance - // to be injected by API handlers. + if config.GetInstanceStatsMode() == config.InstanceStatsModeBaffle { + // Whack random stats on the instance to be used + // by handlers in internal/api/client/instance. instance.RandomStats = c.RandomStats() } @@ -1827,9 +1827,9 @@ func (c *Converter) InstanceToAPIV2Instance(ctx context.Context, i *gtsmodel.Ins instance.Debug = util.Ptr(true) } - if config.GetInstanceStatsRandomize() { - // Whack some random stats on the instance - // to be injected by API handlers. + if config.GetInstanceStatsMode() == config.InstanceStatsModeBaffle { + // Whack random stats on the instance to be used + // by handlers in internal/api/client/instance. instance.RandomStats = c.RandomStats() } |