summaryrefslogtreecommitdiff
path: root/internal/processing/media/update.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-26 20:25:54 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-26 20:25:54 +0200
commitad0e26dc04008feec8de0603c88fbd63f87c18ec (patch)
treefb8402a9d881b6480eba0a2402f05f7b39f7435c /internal/processing/media/update.go
parentadd trusted proxy for parsing client IPs (#115) (diff)
downloadgotosocial-ad0e26dc04008feec8de0603c88fbd63f87c18ec.tar.xz
Markdown Statuses (#116)
* parse markdown statuses if desired * add some preliminary docs for writing posts
Diffstat (limited to 'internal/processing/media/update.go')
-rw-r--r--internal/processing/media/update.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/media/update.go b/internal/processing/media/update.go
index b5ffc77d8..28f3a26f6 100644
--- a/internal/processing/media/update.go
+++ b/internal/processing/media/update.go
@@ -26,7 +26,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/util"
+ "github.com/superseriousbusiness/gotosocial/internal/text"
)
func (p *processor) Update(account *gtsmodel.Account, mediaAttachmentID string, form *apimodel.AttachmentUpdateRequest) (*apimodel.Attachment, gtserror.WithCode) {
@@ -44,7 +44,7 @@ func (p *processor) Update(account *gtsmodel.Account, mediaAttachmentID string,
}
if form.Description != nil {
- attachment.Description = util.RemoveHTML(*form.Description)
+ attachment.Description = text.RemoveHTML(*form.Description)
if err := p.db.UpdateByID(mediaAttachmentID, attachment); err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("database error updating description: %s", err))
}