From 878ed48de34365474498365ab11e3a0feb646be3 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 9 May 2023 17:05:35 +0200 Subject: [bugfix] Don't try to get user when serializing local instance account (#1757) --- internal/gtsmodel/account.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/gtsmodel/account.go') diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go index bae50a749..7956157ff 100644 --- a/internal/gtsmodel/account.go +++ b/internal/gtsmodel/account.go @@ -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 == "" || -- cgit v1.2.3