returnnil,gtserror.NewErrorNotFound(fmt.Errorf("error fetching related accounts for status %s: %s",targetStatusID,err))
}
l.Trace("going to see if status is visible")
visible,err:=p.db.StatusVisible(targetStatus,targetAccount,account,relevantAccounts)// requestingAccount might well be nil here, but StatusVisible knows how to take care of that
iferr!=nil{
returnnil,gtserror.NewErrorNotFound(fmt.Errorf("error seeing if status %s is visible: %s",targetStatus.ID,err))
}
if!visible{
returnnil,gtserror.NewErrorNotFound(errors.New("status is not visible"))
}
iftargetStatus.VisibilityAdvanced!=nil{
if!targetStatus.VisibilityAdvanced.Boostable{
returnnil,gtserror.NewErrorForbidden(errors.New("status is not boostable"))
}
}
// it's visible! it's boostable! so let's boost the FUCK out of it