The file already has the ChannelID field. Therefore, we avoid querying
the database again. This sometimes causes errors in customer environments
where there is noticeable replication lag, causing files not to be
indexed entirely.
https://mattermost.atlassian.net/browse/MM-62900
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62159: Avoid SELECT * in channel_store_categories.go
- Added sidebarCategorySelectQuery field to SqlChannelStore struct
- Replaced SELECT * with explicit column selection in GetSidebarCategory and getSidebarCategoriesT functions
- Updated raw SQL query in addChannelToFavoritesCategoryT to use explicit column selection
- Made the implementation more resilient to schema changes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* use sc alias, simplify
* MM-62159: Fix ambiguous ID column in sidebar category queries
- Modified sidebarCategorySelectQuery initialization to explicitly use "sc" table alias for all columns
- Prevents "Column 'Id' in field list is ambiguous" error when joining with other tables
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62159: Consistently use table aliases in sidebar categories queries
- Added 'sc' table alias to all sidebar category queries
- Ensures consistency and avoids ambiguous column errors in future joins
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62159: Replace 'sc' alias with full 'SidebarCategories' table name
- Replaced all instances of the 'sc' alias with the full table name 'SidebarCategories'
- Updated the SidebarCategories query builder to use the full table name
- Removed commented-out debug printf statement
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* New channel menu using new menu system
* fix e2e-tests
* remove extraneous separator
* lint fix
* fix test after merge
* update to pass properties to first menu item
* fix e2etest
* refactor: Update channel header menu items to use const event handlers
* refactor: Extract plugin item click handler in channel header menu
* refactor: Improve error handling and button click handlers in mobile channel header plugins
* lint fixes
* updates for code reveiw
* run i18n-extract
* fix unit test
* fix: Close channel dropdown menu by clicking channel header title
* fix: Use keyboard escape to close channel dropdown menu in e2e tests
* fix cypress test
* fix: Resolve MUI Menu component fragment rendering issue
* cleanup
* remove unneccessary css
* fixing testing issues
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
When a search term is a fully quoted string, we want to avoid
stemming if it is supported by the search backend.
For Postgres, it does provide a feature by which if we use the
"simple" search config, then no stemming is performed and an exact
match with the word is done without having to resort
to LIKE queries.
Unfortunately, for ES/OS this is not an option because
the message field is a text field, which means ES/OS will analyze it,
stem it and store it in its root form. Therefore, no exact match
can be possible with ES/OS.
The only solution here is to have yet another keyword field
for message which will store it in its raw form. But this
will effectively double the disk storage for post indices
and not a good design choice.
Ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html#avoid-term-query-text-fieldshttps://mattermost.atlassian.net/browse/MM-60790
```release-note
NONE
```
* re-arrange the tests to run only on DB
```release-note
NONE
```
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Fixed a bug where escape would delete all typed content
* Fixed rootId and postID
* fixed tests
* Type fix
* Fixed a test
* Search result edit fix
* Removed a test change
* threads view isn't RHS
* Fixed a cypress test
* Fixed a cypress test
* Fixed a flaky playwighr test
* Update Go version to v1.23.7
* Bump golangci-lint to a version supporting Go 1.23
* Fix golangci-lint warnings
Several rules from gosimple, revive and staticcheck linters were
failing:
- Redefinition of built-in identifiers (max, min, new, recover...)
- Use of printf-like functions with simple strings
- Check for nil slices, when len already takes it into account
* Trigger Build
* Trigger Build
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* ClaimJob now returns newly claimed job
* internal code affected by change
* test changes required
* two branches: for mysql, use transaction; for postgres, use returning
* two branches: for mysql, use transaction; for postgres, use returning
* use same millis value for LastActivityAt and StartAt
* blank commit
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62161: Replace SELECT * in session_store.go
- Replaced all SELECT * queries with explicit column selection
- Used query builder instead of raw SQL strings where possible
- Added reusable sessionSelectQuery in the store constructor
- Added comprehensive test for GetSessionsWithActiveDeviceIds
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix variable shadowing issues in session_store.go
Resolved variable shadowing by reassigning to the existing error variables instead of declaring new ones in scoped blocks.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix code formatting in session_store test file
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Hide timezone notice for bot DMs
* showRemoteUserHour to false
* use_post_box_indicator test
* added showRemoteUserHour in all test cases
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62312 - modal focus management; revamp quick switch channel modal!
* get quick switch test working
* configure the generic modal to accept refs to focus within and onhide to the origin element
* apply pr feedback, get modal element get autofocus, use id instead of ref
* update more direct channels modal to use generic modal
* fix unit tests and snapshots
* fix unit tests
* fix modal margin top to fit in smaller screens
* fix e2e test
* remove unnecesary onexited extra call
* fix e2e tests
* set correct label
* fix snapshots
* create helper function for sending custom focus event
* migrate quick switch modal to use new approach to focus
* migrate more direct channels modal to new approach
* fix snapshots
* fix types
* fix modal closing behavior
* fix snapshots
* fix cypress tests
* remove only
* MM-62677 - migrate modals, invite modal work
* user settings modal
* fix snapshots
* finish user settings migration
* migrate confirm modal to use generic modal
* notification preferences migration
* implement focus back to trigger to channel notifications modal
* fix test snapshots
* initial self code review
* fix CI errors, translation and some types
* add modal location param and adjust test
* fix cypress test text
* fix cypress test text
* fix e2e test for invitation modal
* fix e2e test selector
* adjust modal height
* temp
* fix e2e tests
* fix snapshot
* fix e2e tests
* fix snapshots
* fix snapshots
* fix snapshots
* fix e2e tests
* update snapshots
* fix snapshots
* fix linter
* Implement PR feedback
* fix e2e tests
* adjust styling for channel notifications modal
* more fixes to e2e tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-61685: Add described by prop to notifications settings
* MM-61685: Fixed issue related to aria-described being overritten internally
* MM-61685: Moved Input component outside NotificationTab class component
* MM-61685: Fixed failing CI
---------
Co-authored-by: ayush-chauhan233 <ankur@brightscout.com>
Co-authored-by: ayush-chauhan233 <ayush.chauhan@brightscout.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Updates the property service and store method signatures
Getters can now receive a `groupID` that narrows down the query if
present, so it's not necessary to check for the group ID on the
returning values from the outside layers.
The Search methods now receive the `groupID` and the `targetID`
explicitly as parameters, incentivizing the use of the indexes that
the underlying tables have on the searches.
* Fix tests
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>