Skip to content

Commit

Permalink
messagix: fix IsAuthenticated check
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 12, 2025
1 parent 84a6eb8 commit 7c77e7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ func (m *MetaClient) Disconnect() {
}

func (m *MetaClient) IsLoggedIn() bool {
return m.Client.IsAuthenticated()
return m.Client.IsAuthenticatedAndLoaded()
}

func (m *MetaClient) IsThisUser(ctx context.Context, userID networkid.UserID) bool {
Expand Down
6 changes: 5 additions & 1 deletion pkg/messagix/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ func (c *Client) IsAuthenticated() bool {
} else {
isAuthenticated = c.configs.browserConfigTable.PolarisViewer.ID != ""
}
return isAuthenticated && c.syncManager != nil
return isAuthenticated
}

func (c *Client) IsAuthenticatedAndLoaded() bool {
return c.IsAuthenticated() && c.syncManager != nil
}

func (c *Client) GetCurrentAccount() (types.UserInfo, error) {
Expand Down

0 comments on commit 7c77e7a

Please sign in to comment.