mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-12 16:47:28 -06:00
[bugfix/chore] Announce reliability updates (#2405)
* [bugfix/chore] `Announce` updates * test update * fix tests * TestParseAnnounce * update comments * don't lock/unlock, change function signature * naming stuff * don't check domain block twice * UnwrapIfBoost * beep boop
This commit is contained in:
parent
d1cac53cbb
commit
0e2c342191
15 changed files with 425 additions and 285 deletions
|
|
@ -51,6 +51,11 @@ func (p *Processor) StatusGet(ctx context.Context, requestedUser string, statusI
|
|||
return nil, gtserror.NewErrorNotFound(errors.New(text))
|
||||
}
|
||||
|
||||
if status.BoostOfID != "" {
|
||||
const text = "status is a boost wrapper"
|
||||
return nil, gtserror.NewErrorNotFound(errors.New(text))
|
||||
}
|
||||
|
||||
visible, err := p.filter.StatusVisible(ctx, requester, status)
|
||||
if err != nil {
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
|
|
@ -106,6 +111,11 @@ func (p *Processor) StatusRepliesGet(
|
|||
return nil, gtserror.NewErrorNotFound(errors.New(text))
|
||||
}
|
||||
|
||||
if status.BoostOfID != "" {
|
||||
const text = "status is a boost wrapper"
|
||||
return nil, gtserror.NewErrorNotFound(errors.New(text))
|
||||
}
|
||||
|
||||
// Parse replies collection ID from status' URI with onlyOtherAccounts param.
|
||||
onlyOtherAccStr := "only_other_accounts=" + strconv.FormatBool(onlyOtherAccounts)
|
||||
collectionID, err := url.Parse(status.URI + "/replies?" + onlyOtherAccStr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue