diff options
| author | 2024-01-05 13:39:31 +0100 | |
|---|---|---|
| committer | 2024-01-05 13:39:31 +0100 | |
| commit | d5e3996a18ee37fc4bdf5718632d3d19ac7a8c1b (patch) | |
| tree | 7b8df224893611c77cadc847c2fd8d7ec239b636 /internal/api/model | |
| parent | [bugfix] fix check for closed poll to account for non-zero closed time but in... (diff) | |
| download | gotosocial-d5e3996a18ee37fc4bdf5718632d3d19ac7a8c1b.tar.xz | |
[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)
* [feature] Parse instance descriptors as markdown, show T&C on /about
* lint
* remove unnecessary nullzero tags
Diffstat (limited to 'internal/api/model')
| -rw-r--r-- | internal/api/model/instancev1.go | 6 | ||||
| -rw-r--r-- | internal/api/model/instancev2.go | 4 | 
2 files changed, 10 insertions, 0 deletions
diff --git a/internal/api/model/instancev1.go b/internal/api/model/instancev1.go index 2e5fef123..bec719941 100644 --- a/internal/api/model/instancev1.go +++ b/internal/api/model/instancev1.go @@ -38,12 +38,16 @@ type InstanceV1 struct {  	//  	// This should be displayed on the 'about' page for an instance.  	Description string `json:"description"` +	// Raw (unparsed) version of description. +	DescriptionText string `json:"description_text,omitempty"`  	// A shorter description of the instance.  	//  	// Should be HTML formatted, but might be plaintext.  	//  	// This should be displayed on the instance splash/landing page.  	ShortDescription string `json:"short_description"` +	// Raw (unparsed) version of short description. +	ShortDescriptionText string `json:"short_description_text,omitempty"`  	// An email address that may be used for inquiries.  	// example: admin@example.org  	Email string `json:"email"` @@ -92,6 +96,8 @@ type InstanceV1 struct {  	Rules []InstanceRule `json:"rules"`  	// Terms and conditions for accounts on this instance.  	Terms string `json:"terms,omitempty"` +	// Raw (unparsed) version of terms. +	TermsRaw string `json:"terms_text,omitempty"`  }  // InstanceV1URLs models instance-relevant URLs for client application consumption. diff --git a/internal/api/model/instancev2.go b/internal/api/model/instancev2.go index 6af657813..dda9033b4 100644 --- a/internal/api/model/instancev2.go +++ b/internal/api/model/instancev2.go @@ -49,6 +49,8 @@ type InstanceV2 struct {  	//  	// This should be displayed on the 'about' page for an instance.  	Description string `json:"description"` +	// Raw (unparsed) version of description. +	DescriptionText string `json:"description_text,omitempty"`  	// Basic anonymous usage data for this instance.  	Usage InstanceV2Usage `json:"usage"`  	// An image used to represent this instance. @@ -66,6 +68,8 @@ type InstanceV2 struct {  	Rules []InstanceRule `json:"rules"`  	// Terms and conditions for accounts on this instance.  	Terms string `json:"terms,omitempty"` +	// Raw (unparsed) version of terms. +	TermsText string `json:"terms_text,omitempty"`  }  // Usage data for this instance.  | 
