summaryrefslogtreecommitdiff
path: root/internal/typeutils
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-04-18 13:22:55 +0200
committerLibravatar GitHub <noreply@github.com>2024-04-18 13:22:55 +0200
commitb7c629a18a3154b7cf8231ce6e4cbb47e8c32730 (patch)
treec1b01886d4a4bdbb8a4ca0fb5be7b2766b7091dd /internal/typeutils
parent[feature] Stub conversations endpoint (#2853) (diff)
downloadgotosocial-b7c629a18a3154b7cf8231ce6e4cbb47e8c32730.tar.xz
[bugfix] Fix incorrect field name for status source, add helpful message (#2854)
* [bugfix] Fix incorrect field name for status source, add helpful message * swagger * yyammm
Diffstat (limited to 'internal/typeutils')
-rw-r--r--internal/typeutils/internaltofrontend.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index 98e1a4611..cbd4c6c5c 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -796,9 +796,13 @@ func (c *Converter) StatusToWebStatus(
// Callers should check beforehand whether a requester has permission to view the
// source of the status, and ensure they're passing only a local status into this function.
func (c *Converter) StatusToAPIStatusSource(ctx context.Context, s *gtsmodel.Status) (*apimodel.StatusSource, error) {
+ // TODO: remove this when edit support is added.
+ text := "**STATUS EDITS ARE NOT CURRENTLY SUPPORTED IN GOTOSOCIAL (coming in 2024)**\n" +
+ "You can review the original text of your status below, but you will not be able to submit this edit.\n\n---\n\n" + s.Text
+
return &apimodel.StatusSource{
ID: s.ID,
- Text: s.Text,
+ Text: text,
SpoilerText: s.ContentWarning,
}, nil
}