summaryrefslogtreecommitdiff
path: root/internal/processing/media/unattach.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media/unattach.go')
-rw-r--r--internal/processing/media/unattach.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/processing/media/unattach.go b/internal/processing/media/unattach.go
index 421b64b2f..816b5134e 100644
--- a/internal/processing/media/unattach.go
+++ b/internal/processing/media/unattach.go
@@ -30,7 +30,9 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
-func (p *processor) Unattach(ctx context.Context, account *gtsmodel.Account, mediaAttachmentID string) (*apimodel.Attachment, gtserror.WithCode) {
+// Unattach unattaches the media attachment with the given ID from any statuses it was attached to, making it available
+// for reattachment again.
+func (p *Processor) Unattach(ctx context.Context, account *gtsmodel.Account, mediaAttachmentID string) (*apimodel.Attachment, gtserror.WithCode) {
attachment, err := p.db.GetAttachmentByID(ctx, mediaAttachmentID)
if err != nil {
if err == db.ErrNoEntries {