From 07d27709957248008c61d6b8d553e3d2eb14d154 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:52:42 +0100 Subject: [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 --- internal/api/model/well-known.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'internal/api/model') diff --git a/internal/api/model/well-known.go b/internal/api/model/well-known.go index 54d9912c8..d9948f951 100644 --- a/internal/api/model/well-known.go +++ b/internal/api/model/well-known.go @@ -70,6 +70,12 @@ type NodeInfoSoftware struct { Name string `json:"name"` // example: 0.1.2 1234567 Version string `json:"version"` + // Repository for the software. Omitted in version 2.0. + // example: https://codeberg.org/superseriousbusiness/gotosocial + Repository string `json:"repository,omitempty"` + // Homepage for the software. Omitted in version 2.0. + // example: https://docs.gotosocial.org + Homepage string `json:"homepage,omitempty"` } // NodeInfoServices represents inbound and outbound services that this node offers connections to. @@ -80,13 +86,16 @@ type NodeInfoServices struct { // NodeInfoUsage represents usage information about this server, such as number of users. type NodeInfoUsage struct { - Users NodeInfoUsers `json:"users"` - LocalPosts int `json:"localPosts"` + Users NodeInfoUsers `json:"users"` + LocalPosts int `json:"localPosts,omitempty"` + LocalComments int `json:"localComments,omitempty"` } // NodeInfoUsers represents aggregate information about the users on the server. type NodeInfoUsers struct { - Total int `json:"total"` + Total int `json:"total"` + ActiveHalfYear int `json:"activeHalfYear,omitempty"` + ActiveMonth int `json:"activeMonth,omitempty"` } // HostMeta represents a hostmeta document. -- cgit v1.2.3