From 399cd5585a67660f6d9a7055d356e59be3a06d1f Mon Sep 17 00:00:00 2001 From: Adam Van Ymeren Date: Wed, 2 Jul 2025 14:10:50 -0700 Subject: [PATCH] ScopedStore: fix GetAccessHash always returning found: false --- pkg/connector/store/scoped_store.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/connector/store/scoped_store.go b/pkg/connector/store/scoped_store.go index 5ecbbca1..babac888 100644 --- a/pkg/connector/store/scoped_store.go +++ b/pkg/connector/store/scoped_store.go @@ -189,14 +189,13 @@ var _ updates.AccessHasher = (*ScopedStore)(nil) // Deprecated: only for interface, don't use directly. Use [GetAccessHash] // instead. -func (s *ScopedStore) GetChannelAccessHash(ctx context.Context, forUserID, channelID int64) (accessHash int64, found bool, err error) { +func (s *ScopedStore) GetChannelAccessHash(ctx context.Context, forUserID, channelID int64) (int64, bool, error) { s.assertUserIDMatches(forUserID) - accessHash, err = s.GetAccessHash(ctx, ids.PeerTypeChannel, channelID) + accessHash, err := s.GetAccessHash(ctx, ids.PeerTypeChannel, channelID) if errors.Is(err, ErrNoAccessHash) { - err = nil - found = false + return 0, false, nil } - return + return accessHash, true, err } // Deprecated: only for interface, don't use directly. Use [SetAccessHash]