mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 00:42:25 -05:00
[feature] Show info for pending replies, allow implicit accept of pending replies (#3322)
* [feature] Allow implicit accept of pending replies * update wording
This commit is contained in:
parent
2f13b72e2e
commit
1ce854358d
15 changed files with 1318 additions and 377 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue