From 968550d275039625acc005ba29add210fcfd2eea Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 19 Jun 2025 22:27:28 -0300 Subject: [PATCH] Fix undefined variable 'opts' in getSidebarCategoriesT function (#31815) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function was trying to use 'opts.TeamID' but 'opts' was not defined in the function scope. Changed it to use the 'teamId' parameter which is properly defined in the function signature. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- server/channels/store/sqlstore/channel_store_categories.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/channels/store/sqlstore/channel_store_categories.go b/server/channels/store/sqlstore/channel_store_categories.go index 9b15e137ac3..ba5e03169a0 100644 --- a/server/channels/store/sqlstore/channel_store_categories.go +++ b/server/channels/store/sqlstore/channel_store_categories.go @@ -568,7 +568,7 @@ func (s SqlChannelStore) getSidebarCategoriesT(db sqlxExecutor, userId, teamId s } } - if _, err := s.completePopulatingCategoriesT(db, userId, opts.TeamID, oc.Categories); err != nil { + if _, err := s.completePopulatingCategoriesT(db, userId, teamId, oc.Categories); err != nil { return nil, err }