From b6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:05:26 +0100 Subject: [chore] Deinterface processor and subprocessors (#1501) * [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header --- internal/processing/media/unattach.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/processing/media/unattach.go') 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 { -- cgit v1.2.3