mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-13 10:37:28 -06:00
[bugfix] Don't return Account or Status if new and dereferencing failed, other small fixes (#2563)
* tidy up account, status, webfingering logic a wee bit * go fmt * invert published check * alter resp initialization * get Published from account in typeutils * don't instantiate error for no darn good reason * shadow err * don't repeat error codes in wrapped errors * don't wrap error unnecessarily
This commit is contained in:
parent
ad6f75694e
commit
a3aa6042d7
12 changed files with 461 additions and 210 deletions
|
|
@ -94,6 +94,12 @@ func (a *Account) IsRemote() bool {
|
|||
return !a.IsLocal()
|
||||
}
|
||||
|
||||
// IsNew returns whether an account is "new" in the sense
|
||||
// that it has not been previously stored in the database.
|
||||
func (a *Account) IsNew() bool {
|
||||
return a.CreatedAt.IsZero()
|
||||
}
|
||||
|
||||
// IsInstance returns whether account is an instance internal actor account.
|
||||
func (a *Account) IsInstance() bool {
|
||||
if a.IsLocal() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue