[feature] add support for polls + receiving federated status edits (#2330)

This commit is contained in:
kim
2023-11-08 14:32:17 +00:00
committed by GitHub
parent 7204ccedc3
commit e9e5dc5a40
84 changed files with 3992 additions and 570 deletions

View File

@@ -47,8 +47,11 @@ func (p *Processor) GetTargetAccountBy(
if target == nil {
// DB loader could not find account in database.
err := errors.New("target account not found")
return nil, false, gtserror.NewErrorNotFound(err)
const text = "target account not found"
return nil, false, gtserror.NewErrorNotFound(
errors.New(text),
text,
)
}
// Check whether target account is visible to requesting account.
@@ -106,8 +109,11 @@ func (p *Processor) GetVisibleTargetAccount(
if !visible {
// Pretend account doesn't exist if not visible.
err := errors.New("target account not found")
return nil, gtserror.NewErrorNotFound(err)
const text = "target account not found"
return nil, gtserror.NewErrorNotFound(
errors.New(text),
text,
)
}
return target, nil