diff options
author | 2024-09-23 14:42:19 +0200 | |
---|---|---|
committer | 2024-09-23 14:42:19 +0200 | |
commit | 1ce854358def5f04b7c3b73418ab56bb58512634 (patch) | |
tree | 94d827b90e435c88367d080f53b63ee2285905d6 /internal/processing/status/create.go | |
parent | [chore] add nometrics build tagging to metrics API endpoint (#3331) (diff) | |
download | gotosocial-1ce854358def5f04b7c3b73418ab56bb58512634.tar.xz |
[feature] Show info for pending replies, allow implicit accept of pending replies (#3322)
* [feature] Allow implicit accept of pending replies
* update wording
Diffstat (limited to 'internal/processing/status/create.go')
-rw-r--r-- | internal/processing/status/create.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/processing/status/create.go b/internal/processing/status/create.go index 1513018ae..184a92680 100644 --- a/internal/processing/status/create.go +++ b/internal/processing/status/create.go @@ -164,6 +164,23 @@ func (p *Processor) Create( } } + // If the new status replies to a status that + // replies to us, use our reply as an implicit + // accept of any pending interaction. + implicitlyAccepted, errWithCode := p.implicitlyAccept(ctx, + requester, status, + ) + if errWithCode != nil { + return nil, errWithCode + } + + // If we ended up implicitly accepting, mark the + // replied-to status as no longer pending approval + // so it's serialized properly via the API. + if implicitlyAccepted { + status.InReplyTo.PendingApproval = util.Ptr(false) + } + return p.c.GetAPIStatus(ctx, requester, status) } |