mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-28 12:13:32 -06:00
[bugfix] Don't try to get user when serializing local instance account (#1757)
This commit is contained in:
parent
11e843a273
commit
878ed48de3
4 changed files with 139 additions and 29 deletions
|
|
@ -95,6 +95,12 @@ func (a *Account) IsRemote() bool {
|
|||
|
||||
// IsInstance returns whether account is an instance internal actor account.
|
||||
func (a *Account) IsInstance() bool {
|
||||
if a.IsLocal() {
|
||||
// Check if our instance account.
|
||||
return a.Username == config.GetHost()
|
||||
}
|
||||
|
||||
// Check if remote instance account.
|
||||
return a.Username == a.Domain ||
|
||||
a.FollowersURI == "" ||
|
||||
a.FollowingURI == "" ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue