- 👷🩹 — Add limitless patch and GitlabCI recipe
- 📝 — Add instructions on how to use the patch from Framasoft
- 💄 — Add logo, thanks to Geoffrey Dorne
- 👷 — ARM64 cross-compilation in CI
* [MM-69126] Fix custom emoji upload size and GIF frame limits
* Assert 413 status and error ID in oversized emoji test
* Raise max emoji GIF frames to 70
* Enforce emoji GIF frame limit on the direct-write path
* Tighten thread membership cleanup on team membership changes (#36764)
* Tighten thread membership cleanup on team membership changes
Ensure ThreadMembership rows are cleaned up when a user is removed
from or leaves a team, add a defense-in-depth filter on the thread
retrieval path so memberships referencing channels the user is no
longer a member of are excluded, and add a one-time migration to
clean up stale records on existing deployments.
https://mattermost.atlassian.net/browse/MM-69008
* Centralize per-channel membership removal and tighten tests
Extract the combined channel-member and thread-membership removal into
a shared helper used by both removeUserFromChannel and LeaveTeam, so
future code paths cannot revoke channel access without dropping the
dependent thread state. The channel-leave event is now logged after
the combined removal completes.
Also drop verbose test header comments and rename a test to a
behavior-focused name.
* Backfill channel members in thread storetest setups
The new ChannelMembers predicate on thread read queries filters out
ThreadMembership rows whose user has no ChannelMembers row for the
thread's channel. Several existing storetest setups bypassed the
normal write path and inserted threads/memberships without channel
members. Add the missing channel-member rows so the test data matches
the real-world invariant.
* Retrigger enterprise CI
Pick up enterprise merge e6953d4 (master into
MM-69008-thread-membership-team-leave) in the combined Enterprise
CI/tests lane, which pins the enterprise SHA at mattermost-side
dispatch time.
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Add MySQL migration for 000195_threadmemberships_cleanup_v2
Co-authored-by: Cursor <cursoragent@cursor.com>
* Apply pre-commit lint fixes
Co-authored-by: Cursor <cursoragent@cursor.com>
* Retrigger CI
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Add TestDesanitizeRemovesAllFakeSettings to catch future omissions
Walks every string field in the config after a Sanitize+desanitize
round-trip and fails if any still holds FakeSetting. This catches the
case where a field is added to Sanitize without a corresponding
desanitize entry.
* Fix ElasticsearchSettings.ClientKey being incorrectly masked as a secret
ClientKey is a file path, not a secret value. Masking it caused the
asterisk string to be persisted to the database on config writes, which
broke TLS client auth on restart.
* Fix desanitize missing entries for fields added in 504fb96fdd98
504fb96fdd98 masked five fields in Sanitize without adding the
corresponding desanitize entries, meaning a config save through the
API would permanently overwrite those fields with FakeSetting:
- FileSettings.ExportAmazonS3SecretAccessKey
- ServiceSettings.GoogleDeveloperKey
- ServiceSettings.GiphySdkKey
- CacheSettings.RedisPassword
- AutoTranslationSettings.LibreTranslate.APIKey
* fixup! Add TestDesanitizeRemovesAllFakeSettings to catch future omissions
* fixup! Fix desanitize missing entries for fields added in 504fb96fdd98
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
server.run_specs.sh invokes Cypress with
--reporter cypress-multi-reporters --reporter-options configFile=reporter-config.json
but the file was never added to this branch (it landed on master in 981ff0bc46
as part of a larger CI refactor). Without it, every spec run fails with
ENOENT against reporter-config.json before the first test executes.
Backports only the single 15-line config file, byte-identical to master.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [MM-68393] Tighten protected role patch authorization (#36197)
* [MM-68393] Tighten protected role patch authorization
Harden role patch authorization for protected system roles and cover the restricted paths with focused API tests.
Made-with: Cursor
* [MM-68393] Fix role patch test shadowing
Rename shadowing response variables in the protected role patch tests so govet passes in core and enterprise check-style jobs.
Made-with: Cursor
* [MM-68393] Block privileged role permissions
Made-with: Cursor
(cherry picked from commit 99b73d4c4acf5ff3546c2548a5aaa804c2aa1b04)
* Fix role patch tests for release-10.11 context and LoginSystemManager APIs
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Nick Misasi <nick.misasi@mattermost.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* [MM-63434] Use forked PDF library with parsing depth limit (#35947)
* [MM-63434] Use forked PDF library with parsing depth limit
Replace github.com/ledongthuc/pdf with a fork that limits object
nesting depth during parsing. Add test coverage.
* Reverting incorrect merge that lost the change to msgpack
The error was in merge 64bdff88d8
* Remove stale ledongthuc/pdf checksums after fork replace (go mod tidy)
* Fix TestPdfFile expected text for forked PDF extractor (release-10.11)
The jgheithcock/pdf fork returns a leading newline for sample-doc.pdf; align
with master and 11.x cherry-picks.
* Support Elasticsearch v9 alongside v8
* Add CI workflow changes for Elasticsearch v8/v9 testing
* Support Elasticsearch v7 in addition to v8/v9, add v7 CI test job
Lowers the minimum supported ES version from 8 to 7 to avoid dropping
v7 support in a dot release. Adds a dedicated CI job to verify v7
compatibility alongside the existing v8 and v9 (default) jobs.
* Fix ES7 plugin install crash on cgroup v2 hosts
* Fix ES 7 container startup on cgroup v2 Linux (GitHub Actions)
ES 7 bundles JDK 11, which crashes with a NullPointerException in
CgroupV2Subsystem.getMountPoint() on modern Linux kernels that use
cgroup v2 (including GitHub Actions ubuntu-latest runners). The flag
was already set during the Dockerfile RUN step, but not at runtime.
Adding -XX:-UseContainerSupport to ES_JAVA_OPTS in docker-compose
fixes the crash. The flag is harmless on ES 8/9 which ship JDK 17+
where the cgroup v2 bug is fixed (it simply opts out of container-aware
JVM sizing).
* Capture docker compose logs in CI test artifact
* Use ES 7.17.29 for v7 CI test; remove cgroup v2 workarounds
ES 7.17.0 bundled JDK 17.0.1 which had a cgroup v2 bug
(CgroupV2Subsystem NPE) not fixable via -XX:-UseContainerSupport.
ES 7.17.29 bundles JDK 22 where the bug is long fixed.
Reverts the -XX:-UseContainerSupport workarounds added in the
previous two commits as they were based on a wrong diagnosis
and are no longer needed.
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
The test at channels/app/platform/web_conn_test.go was added by #35988
without a defer th.TearDown() call. Setup(t) creates a PlatformService
that opens its own SqlStore pool and runs morph migrations against the
shared temp database. Without TearDown, that pool stays alive until
TestMain exits, so the morph-held idle connections are still attached
to the database when MainHelper.Close runs DROP DATABASE. Postgres
refuses the drop with "is being accessed by other users" and the whole
package panics in teardown.
On master and release-11.4 and later, setupTestHelper registers the
shutdown via tb.Cleanup automatically, so the same test does not leak
there. release-10.11 still uses the manual TearDown pattern, which is
why the fix is scoped to this branch.
* ci: shard server Postgres tests into 4 parallel runners (#35739)
* ci: add test sharding plumbing to server CI
Add infrastructure for upcoming test sharding without changing behavior:
- Add shard-index and shard-total inputs to server-test-template.yml
(defaults preserve existing single-runner behavior)
- Add timing cache restore step (activates only when shard-total > 1)
- Add merge-postgres-test-results job to server-ci.yml that:
- Merges JUnit XML reports from shard artifacts
- Saves timing data cache for future shard balancing
- Handles both single-artifact and multi-shard scenarios
- Add .gitignore entries for timing cache and shard work files
Co-authored-by: Claude <claude@anthropic.com>
* ci: shard server Postgres tests into 4 parallel runners
Extract sharding logic into standalone, tested scripts and enable
4-shard parallel test execution for server Postgres CI:
Scripts:
- server/scripts/shard-split.js: Node.js bin-packing solver that
assigns test packages to shards using timing data from previous runs.
Two-tier strategy: light packages (<2min) whole, heavy packages
(api4, app) split at individual test level.
- server/scripts/run-shard-tests.sh: Multi-run wrapper that calls
gotestsum directly for each package group with -run regex filters.
- server/scripts/shard-split.test.js: 8 test cases covering round-robin
fallback, timing-based balancing, heavy package splitting, JUnit XML
fallback, and enterprise package separation.
Workflow changes:
- server-test-template.yml: Add shard splitting step that discovers test
packages and runs the solver. Modified Run Tests step to use wrapper
script when sharding is active.
- server-ci.yml: Add 4-shard matrix to test-postgres-normal. Update
merge job artifact patterns for shard-specific names.
Performance: 7.2 min with timing cache vs 62.5 min baseline = 88%
wall-time improvement. First run without cache uses JUnit XML fallback
or round-robin, then populates the cache for subsequent runs.
Co-authored-by: Claude <claude@anthropic.com>
* fix: raise heavy package threshold to 5 min to preserve test isolation
sqlstore integrity tests scan the entire database and fail when other
packages' test data is present. At 182s, sqlstore was just over the
120s threshold and getting split at test level. Raising to 300s keeps
only api4 (~38 min) and app (~15 min) as heavy — where the real
sharding gains are — while sqlstore, elasticsearch, etc. stay whole
and maintain their test isolation guarantees.
Co-authored-by: Claude <claude@anthropic.com>
* ci: only save test timing cache on default branch
PR branches always restore from master's timing cache via restore-keys
prefix matching. Timing data is stable day-to-day so this eliminates
cache misses on first PR runs and reduces cache storage.
Co-authored-by: Claude <claude@anthropic.com>
* ci: skip FIPS tests on PRs (enterprise CI handles compile check)
Per review feedback: the enterprise CI already runs a FIPS compile
check on every PR. Running the full FIPS test suite on PRs is redundant
since it uses the identical test suite as non-FIPS — the only
FIPS-specific failure mode is a build failure from non-approved crypto
imports, which the enterprise compile check catches.
Full FIPS tests continue to run on every push to master.
Co-authored-by: Claude <claude@anthropic.com>
* fix: address review feedback on run-shard-tests.sh
- Remove set -e so all test runs execute even if earlier ones fail;
track failures and exit with error at the end (wiggin77)
- Remove unused top-level COVERAGE_FLAG variable (wiggin77)
- Fix RUN_IDX increment position so report, json, and coverage files
share the same index (wiggin77)
- Update workflow comment: heavy threshold is 5 min, not 2 min (wiggin77)
Co-authored-by: Claude <claude@anthropic.com>
* style: use node: prefix for built-in fs module in shard-split.js
Co-authored-by: Claude <claude@anthropic.com>
* fix: avoid interpolating file paths into generated shell script
Read shard package lists from files at runtime instead of interpolating
them into the generated script via printf. This prevents theoretical
shell metacharacter injection from directory names, as flagged by
DryRun Security.
Co-authored-by: Claude <claude@anthropic.com>
* fix(ci): rename merged artifact to match server-ci-report glob
The merged artifact was named postgres-server-test-logs-merged which
does not match the *-test-logs pattern in server-ci-report.yml,
causing Postgres test results to be missing from PR/commit reports.
Also pins junit-report-merger to exact version 7.0.0 for supply chain
safety.
Co-authored-by: Claude <claude@anthropic.com>
* fix(ci): pass RACE_MODE env into Docker container
RACE_MODE was set on the host runner but never included in the docker
run --env list. The light-package path worked because the heredoc
expanded on the host, but run-shard-tests.sh reads RACE_MODE at
runtime inside the container where it was unset. This caused heavy
packages (api4, app) to silently lose -race detection.
Co-authored-by: Claude <claude@anthropic.com>
* fix(ci): discover new tests in heavy packages not in timing cache
Tests not present in the timing cache (newly added or renamed) would
not appear in any shard -run regex, causing them to silently skip.
After building items from the cache, run go test -list to discover
current test names and assign any cache-missing tests to shards via
the normal bin-packing algorithm with a small default duration.
Co-authored-by: Claude <claude@anthropic.com>
* fix(ci): add missing line continuation backslash in docker run
The previous --env FIPS_ENABLED line was missing a trailing backslash
after adding --env RACE_MODE, causing docker run to see a truncated
command and fail with "requires at least 1 argument".
Co-authored-by: Claude <claude@anthropic.com>
* fix(ci): add setup-go step for shard test discovery
go test -list in shard-split.js runs on the host runner via execSync,
but Go is only available inside the Docker container. Without this
step, every invocation fails silently and new-test discovery is a
no-op. Adding actions/setup-go before the shard split step ensures
the Go toolchain is available on the host.
Co-authored-by: Claude <claude@anthropic.com>
---------
Co-authored-by: Claude <claude@anthropic.com>
* updated go to version 1.25.8 (#35817)
* updated go to version 1.25.8
* updated gotestsum version to work with go 1.25.8
go 1.25 does not work with indirect tools 0.11 dependency pulled by
gotestsum.
* Use sync.WaitGroup.Go to simplify goroutine creation
Replace the wg.Add(1) + go func() { defer wg.Done() }() pattern with
wg.Go(), which was introduced in Go 1.25.
* pushes fips image on workflow dispatch to allow fips test to run on go version update
* fix new requirements for FIPS compliance imposed on updating to go 1.25.8
* updates openssl symbol check for library shipped with FIPS new versions
go-openssl v2 shipped with FIPS versions starting from 1.25 uses mkcgo to generate
bindings causing symbol names to be different.
* removes temp workflow-dispatch condition
* keep versions out of agents md file
* upgrade golangci-lint (#35845)
* test: clean up channel store data after TestChannelStore (#36066)
TestChannelStore sub-tests create channels, members, and team members
using fake TeamIds and UserIds (model.NewId() for non-existent rows).
These records are left in the database and cause integrity tests
(TestCheck*) running in the same binary to fail their full-table scans.
Register a t.Cleanup on TestChannelStore that purges the affected
tables entirely. A blanket purge is safe: the schema enforces no FK
constraints, and every test suite creates its own data independently.
* Fix command injection in server-test-template workflow (#36080)
Replace the unquoted heredoc (which embedded GITHUB_HEAD_REF into a
generated script) with a cp of the existing run-shard-tests.sh, which
already handles the light-only case. Pass BUILD_NUMBER and TEST_TARGET
as explicit docker env vars instead of interpolating them into script
content.
* fix(ci): restore testname format in sharded gotestsum runs (#36078)
run-shard-tests.sh called gotestsum directly without --format, so it
fell back to gotestsum's default (pkgname) instead of the testname
format set by the Makefile. Pass --format "${GOTESTSUM_FORMAT:-testname}"
to match the Makefile default.
Co-authored-by: Mattermost Build <build@mattermost.com>
* fix(lint): fix pre-existing golangci-lint v2.11.4 issues
Fix misspelling in comment and redundant nil check flagged by the
upgraded linter.
* ci: use golang image for test runner on release-10.11
mattermost-build-server images are not built for release branches.
Use the official golang image which is always available for any Go version.
* ci: use mattermost/mattermost-build-server for release-10.11
The mattermostdevelopment/ images are only built for master.
The production mattermost/ images are built for release branches.
* ci: use mattermost/mattermost-build-server in mmctl test template
The mattermostdevelopment/ images are only built for master.
The production mattermost/ images are built for release branches.
---------
Co-authored-by: Pavel Zeman <pavel.zeman@mattermost.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* adds team member data sanitizing (#35562)
* adds team member data sanitizing
* assert using require
* adds data sanitizing to team members for user endpoint
* team admin data visibility now tests with different user
(cherry picked from commit 2be57a7ec0c67004b77c76386f20a630920196e3)
* removes wrong argument in test helper calls
* fix: add explicit permission grant in team members test (#36007)
* fix: add explicit permission grant in team members test
TestGetTeamMembersForUserRoleDataSanitization was relying on a permission
side-effect leaked from concurrent tests. Under fullyparallel, another test
temporarily adds PermissionReadOtherUsersTeams to system_user role, which
the team admin subtest accidentally benefits from. Under sequential execution
(binary parameters mode), no concurrent test leaks this permission, so the
team admin correctly gets 403.
Fix by explicitly granting ReadOtherUsersTeams in the subtest setup, matching
the pattern used in adjacent subtests.
Release Note
NONE
Co-authored-by: Claude <claude@anthropic.com>
* fix: remove explanatory comment per review feedback
---------
Co-authored-by: Claude <claude@anthropic.com>
* removes extra arg from test helper call
---------
Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
Co-authored-by: Pavel Zeman <pavel.zeman@mattermost.com>
Co-authored-by: Claude <claude@anthropic.com>
* improves time limit checks
* consistently check for presence of patch fields
* fix variable shadowing in test
* allow idempotent pinning operations with time limit expired
* new utility function for post limit time check
* fix style issue
* Add missing E2E CI files and delivery-platform migration for release-10.11
- Add calculate-playwright-results and calculate-cypress-results GitHub Actions
(referenced by e2e-tests-playwright-template.yml and e2e-tests-cypress-template.yml
but never backported to release-10.11)
- Add e2e-tests/playwright/merge.config.mjs (required by merge-reports step)
- Add run-specs Makefile target and server.run_specs.sh (required by run-failed-tests job)
- Fix merge-shard-results step: pin @playwright/test version and add fallback
for when no blob reports exist (json reporter output used directly)
- Remove pull_request trigger from e2e-tests-ci.yml (delivery-platform migration)
- Remove dead e2e-fulltests-ci.yml and e2e-tests-ci-template.yml
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Automate setup-go-work as a dependency for Make targets (#35476)
* automate setup-go-work
It's all to easy to forget to `make setup-go-work`, only to run into mysterious build failures. Let's default to doing this automatically, unless `SKIP_SETUP_GO_WORK` is true (or the legacy `IGNORE_GO_WORK_IF_EXISTS`, which was oddly named, since we can't actually ignore it.)
* Make setup-go-work recipe fail-fast with set -e
* ci: post success to required e2e status contexts when no relevant changes (#35880)
* ci: post correct skip status from within cypress/playwright reusable workflows
The 'Required Status Checks' ruleset requires e2e-test/cypress-full/enterprise
and e2e-test/playwright-full/enterprise on master and release-*.* branches.
When a PR has no E2E-relevant changes, the jobs were silently skipped, leaving
required statuses unset and the PR permanently blocked.
Architecture fix: instead of a separate skip-e2e job in the caller that
hardcodes status context names, the skip logic now lives inside the reusable
workflows that already own and compute those context names.
Changes:
- e2e-tests-cypress.yml: add should_run input (default 'true') + skip job
that uses the dynamically-computed context_name when should_run == 'false'
- e2e-tests-playwright.yml: same pattern
- e2e-tests-ci.yml: change e2e-cypress/e2e-playwright job conditions from
should_run == 'true' to PR_NUMBER != '' (always run when there's a PR),
pass should_run as input to both reusable workflows
* Add E2E template workflows for Cypress and Playwright
* Add check-e2e-test-only action for E2E workflow
* Fix: Remove circular E2E workflow file check - skip tests when only CI files change
* Add pull_request trigger to E2E workflow - run automatically on PR events
* Fix resolve-pr to use github.event context for automatic pull_request trigger
* Fix checkout condition to work with pull_request events
* Fix: Remove orphaned fi statement in check-changes script
---------
Co-authored-by: yasser khan <attitude3cena.yf@gmail.com>
* MM-66937 Add E2E tests for bug
* MM-66937 Remove delayInputUpdate on that input to fix the bug
* Remove delayInputUpdate prop from QuickInput and SuggestionBox
* Run prettier
* Inline updateInputFromProps and remove eslint-disable that's no longer needed
* Fix snapshots
* keeps plugin config on reenablement
* fixes local config patch on plugin reenablement
(cherry picked from commit c9a4092ac0a20351e3c2e0ac0cb593cc28b5bc0e)
Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
* MM-67522 Add tests for syncing user statuses (#35269)
* MM-67522 Add tests for syncing user statuses
* Clean up newly added tests
* Fix style
* Use SyncResponse.StatusErrors when statuses fail to sync
(cherry picked from commit 033867a3448875d84653c81026d31bddf3ce4c40)
* Rename rctx to c
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
This commit reverts PR #30214, which addressed bug MM-60790 but caused a
performance regression tracked by MM-66782.
This revert has two implications:
1. The performance issue is solved.
2. The original bug is re-introduced.
Re-introducing the original bug seems not to be ideal, but I argue that
the original PR did not actually fix the bug:
- Before that PR, looking for a quoted string would return additional
results: the UX was slightly confusing, because when the user looked
for the word "stateful", the results would contain matches like
"states" (see MM-60790).
- After that PR, looking for a quoted string can timeout, so that the
list of results becomes empty. The UX here may be less confusing,
since the user simply doesn't find what they're looking for, and they
may assume that string is not present in any post, but it's completely
wrong: the result list is empty because the SQL query timed out and
thus the endpoint returned 0 results.
The solution to the original issue should be addressed via
Elasticsearch, which should provide a more refined and precise search
results.
For more information on the investigation on this issue and the
motivation behind the revert, see
https://mattermost.atlassian.net/wiki/x/IYAk_w
Co-authored-by: Mattermost Build <build@mattermost.com>
* improve TestUserUpdateEvents
* improve CheckUserSanitization
* check user sanitization in TestUserUpdateEvents
* minimally sanitize user sent to event creator
* reproduce panic with test
* allow bots in the profile map
* explicitly prevent sending notifications to bots
* persistent notifications: handle senders not in the channel
With glibc 2.34 and the [removal of libpthread](https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread), binaries built using [Debian bookworm](https://www.debian.org/releases/bookworm/) aren't compatible with older but still supported operating systems like RHEL8. In those environments, Mattermost fails to start with errors like:
```
mattermost/bin/mattermost: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by mattermost/bin/mattermost)
mattermost/bin/mattermost: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by mattermost/bin/mattermost)
```
One option might be to generate a static build and avoid the glibc dependency, but this kind of change is out of scope for now. Let's just revert back to using [Debian bullseye](https://www.debian.org/releases/bullseye/), which remains supported until at least August 2026.
(cherry picked from commit c2120b7224ce8d2f8dd34f17fbeba06296b733db)
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* [MM-64893] Account for extra whitespace when replacing date on search hint
* Fix ordering of caret position and selection range
* Revert "Fix ordering of caret position and selection range"
This reverts commit 9d6fc51ef35c242817a52b6206610abc5fc55503.
* Remove delayInputUpdate
(cherry picked from commit c775615868393566d6cf6caa0820869890da97a2)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Create a new config setting, and migrate the old values to new.
https://mattermost.atlassian.net/browse/MM-63652
Skip-Enterprise-PR: true
```release-note
NONE
```
* fix i18n
also fix unit tests
```release-note
NONE
```
* For fresh installations, default to true
```release-note
NONE
```
* gofmt files
```release-note
NONE
```
* Fixing some more strings
```release-note
NONE
```
* Update e2e tests
```release-note
NONE
```
* refactored error managment for deleteUsersCmdF
* updated tests related to deleteUsersCmdF
* updated user_e2e_test to reflect changes made to the deleteUsersCmdF function
* Empty-Commit to retrigger workflow
* applied gofmt formating reqs to user_test.go
* added suggested changes to the deleteUsersCmdF regarding error gathering
* added requested changes regarding error aggragation on deleteUsersCmdF
* style(mmctl): removing trailing whitespace
* feat(mmctl): returning errors in deleteUserCmdF on err
* fix(mmctl): returns when err parsing args
* test(mmctl): updated tests to expect err instead of reading printer
* style: updating returned errs
* tests: updated test to reflect error change
* tests(mmctl): updated e2e DeleteUserCmd test
* Update server/cmd/mmctl/commands/user.go
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* refactor: changing error to return username instead of email
* refactor: changing email to username for errors
---------
Co-authored-by: Arnaud Wanet <andrewwanet9@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* MM-64417 Change permissions table to use a grid for animation
* Don't change padding on permissions table when animating
* Update snapshots
* Combine CSS for AdminPanel and AdminPanelTogglable
* Removed leftover reference to old CSS file
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Stop explicitly passing autocompleteUrlSchemes into text formatting code
This is the first part of changing how autocompleteUrlSchemes works so
that it can be moved to be part of the parser like in mobile instead of
happening in the renderer.
I'm not a fan of using the global store directly in utils/markdown, but
this seems like the only way to have this apply to all the Markdown
that's rendered in various helpers throughout the app. Ideally, we'd
have some getMarkdownParser selector and a hook which provides the
config, but that's a future improvement to make"
* MM-62744 Move URL filtering to the Markdown parser instead of the renderer
MM-62744 is caused by two things:
1. URL autolinking takes place in the Markdown parser which occurs
before at-mention parsing which (despite the "parsing" part) happens
in the Markdown renderer in the web app.
2. The autolinking in marked is very aggressive and identifies anything
that looks like some:text as a link.
Those lead to remote mentions like `@user:server` being incorrectly
parsed by Markdown as a link to `user:server`. It isn't renderered as a
link because the URL filtering logic in the Markdown parser blocks that,
but at that point, the Markdown renderer won't check if it's an
at-mention.
By moving the URL filtering to occur earlier, like it does in the mobile
app, the Markdown code won't autolink `@user:server` (unless the server
has `user` configured as a custom URL scheme for some reason), so it's
free to be turned into an at-mention by the renderer code.
* MM-62744 Ensure various regexes and features support remote mentions
* Update marked back to master
* Improve clarity of channel notification limit messages
- Update user-facing messages to explain performance reasoning and provide guidance
- Enhance admin setting descriptions to be more informative about user experience
- Change admin setting title to better reflect purpose
Fixes#32159
Co-authored-by: Sven Hüster <svelle@users.noreply.github.com>
* Update webapp/channels/src/i18n/en.json
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update server/i18n/en.json
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update server/i18n/en.json
* Update server/i18n/en.json
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Sven Hüster <svelle@users.noreply.github.com>
Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Add defensive fallback for userHasReadPermissionOnSomeResources
When called with a string instead of an object, the function now falls back
to checking a single resource permission instead of failing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Revert "Add defensive fallback for userHasReadPermissionOnSomeResources"
This reverts commit f9c32bc3e2598467e7c8a520319ac5ae49135cbf.
* simpler fix -- remove string as a possible parameter
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Link post actions menu button to existing menu
That menu isn't fully accessible because it uses the old Menu widget,
but the readout will at least be correct when tabbing through the post
controls.
* MM-61595 Use dedicated popover component for post actions menu when empty
* Update unit tests
* Split out ActionsMenuEmptyPopover to start of separate Popover component
Fix navigation to custom data retention policy form by correcting permission
checking functions. The routes for creating and editing custom data retention
policies were using userHasReadPermissionOnSomeResources() with a single
string resource key, causing permission checks to fail and routes to be
hidden.
Changed both custom_policy_form and custom_policy_form_edit routes to use
userHasReadPermissionOnResource() instead, making them consistent with
other working data retention routes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
Only log a warning when the created user exceeds the `MaxUserLimits` if
`MaxUsersLimit > 0`. This was showing up spuriously on licensed servers
for which no limit applied.
Note that this is distinct from blocking user creation past
`MaxHardUsersLimit`.
* Replace SELECT * with explicit column lists in channel store
Migrates channel_store.go away from SELECT * patterns to explicit column
lists for better performance, maintainability, and schema safety.
- Replace GetPinnedPosts raw SQL with query builder using postSliceColumns()
- Replace "cc.*" in group channel search with channelSliceColumns()
- Replace GetChannelsBatchForIndexing raw SQL with query builder
- Replace channel member and team queries with respective column helpers
- Use SelectBuilder helper instead of manual ToSql() calls
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace SELECT * with COUNT(*) in user_test.go
Replaces unnecessary SELECT * queries with SELECT COUNT(*) in
TestPermanentDeleteUser bot count verification. Only needs to check
the count of bots, not retrieve full bot records.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* MM-64428 - user tag invite filtering
* fix lint issues
* remove unnecesary line
* update translations and skip mysql tests
* simplify the solution so in abac channels the invitation link is never shown
* finish clean up of unnecessary code
* clean up and remove no longer necessary translations
* remove leftover props and remove no longer needed tests after simplification
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Initial commit
* feat(function component migration): migrate QuickInput to a function component
* fix: add missing export keyword
* Revert "Initial commit"
This reverts commit e40909c6d0590b67e00f62283f6e5a622fbaf9bb.
* refactor: reposition 'showClearButton' variable so tests pass
* refactor: ignore eslint warnings and rename props
Removed 'deleteProperty' calls since some props are destructured.
* refactor(quick_input): wrap functions in useCallback
Updated snapshots, tests, and removed dead code.
* fix(quick_input): add dependencies to useCallback
Restored quick_input.test.tsx to its initial state and made the value prop optional instead.
* MM-64669 Fix keyboard navigation of settings sidebar and add Playwright test
* MM-64669 Revert changes to Cypress test which masked keyboard bug
The changes that were previously made caused Cypress to refocus the
sidebar repeatedly which stopped the test from failing without fixing
the bug.
* Ensure focus highlight is always visible on sidebar tabs
This may not have been broken by the changes that caused MM-64669, but I
noticed it while I was in there and wanted to fix it.
* Fix settings modal scrolling while changing sections using arrow keys
* Remove accidentally-added field
* Remove pricing modal. Adjust everywhere to instead open mattermost.com/pricing. When air gapped, don't show buttons to view plans.
* Fix lint
* Further clean up of unused code. Fixes for linter
* Remove onboarding tasklist for previews, add Cloud previer banner
* Fixes for linter, i18n
* Revert dev lines
* Fix lint
* When below one minute, switch to seconds
* fix linter
* Add scaffolding for new Cloud Preview Modal
* Style updates
* Fix tests
* fixes for PR feedback
* useExternalLink for opening pricing modal with enriched params
* Fix i17n
* fix style
* Fix style, tests
* Fix linter, types
* Add file
* Make types even more fixed
* fix: correct test case for SKU label not provided scenario
The test "should not render SKU label when not provided" was incorrectly using baseContent which includes a SKU label. Fixed by creating contentWithoutSku that explicitly sets skuLabel to undefined to properly test the scenario where no SKU label is provided.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fine I'll do it myself
* fix linter
* Refactors
* Adjustments from PR review. Adjustments to video experience (poster/play button) and starting to translate
* Fix i18n
* Wrap translation strings with defineMessage for i18n extraction
- Add import for defineMessage and MessageDescriptor from react-intl
- Update type definition to use MessageDescriptor for better type safety
- Wrap all skuLabel, title, and subtitle objects with defineMessage() calls
- This ensures the i18n-extract tool can properly detect translation strings
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fix i18n
* Use regular modal close button
* Fix pipelines
* Fix i18n
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Remove unnecessary CSS properties from preview modal content
Remove display: flex, height: 100%, and flex-direction: column from .preview-modal-content selector as they have no effect per code review feedback.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fixes for PR review
* Fix linter
* Fix i18n
* fix linter
* sticky button in bottom left to re-open preview modal when previously closed
* fix linter
* Resize to better fit in place when multiple teams are present
* Changes to address Harrison's feedback
* change file name, remove index.tsx
* Add the new files
* Rename to fix conflicts
* Add the new files
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Remove pricing modal. Adjust everywhere to instead open mattermost.com/pricing. When air gapped, don't show buttons to view plans.
* Fix lint
* Further clean up of unused code. Fixes for linter
* Remove onboarding tasklist for previews, add Cloud previer banner
* Fixes for linter, i18n
* Revert dev lines
* Fix lint
* When below one minute, switch to seconds
* fix linter
* Add scaffolding for new Cloud Preview Modal
* Style updates
* Fix tests
* fixes for PR feedback
* useExternalLink for opening pricing modal with enriched params
* Fix i17n
* fix style
* Fix style, tests
* Fix linter, types
* Add file
* Make types even more fixed
* fix: correct test case for SKU label not provided scenario
The test "should not render SKU label when not provided" was incorrectly using baseContent which includes a SKU label. Fixed by creating contentWithoutSku that explicitly sets skuLabel to undefined to properly test the scenario where no SKU label is provided.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fine I'll do it myself
* fix linter
* Refactors
* Adjustments from PR review. Adjustments to video experience (poster/play button) and starting to translate
* Fix i18n
* Accept use case in CWS login, redirect to proper team, with filtered content in preview modal
* Wrap translation strings with defineMessage for i18n extraction
- Add import for defineMessage and MessageDescriptor from react-intl
- Update type definition to use MessageDescriptor for better type safety
- Wrap all skuLabel, title, and subtitle objects with defineMessage() calls
- This ensures the i18n-extract tool can properly detect translation strings
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fix i18n
* Hiding modal will presist through refreshes
* Fix linter
* Add exception to notification permission bar for cloud previews
* Use regular modal close button
* Fix pipelines
* Fix i18n
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Remove unnecessary CSS properties from preview modal content
Remove display: flex, height: 100%, and flex-direction: column from .preview-modal-content selector as they have no effect per code review feedback.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* feat: use getBool selector instead of get for boolean preference check
- Replace getPreference with getBool to avoid explicit === 'true' comparison
- Follows Harrison's review suggestion for cleaner boolean handling
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* fix linter
* Fixes for PR review
* Fix linter
* Fix i18n
* fix linter
* Changes to address Harrison's feedback
* Change file name, remove index.tsx
* change file name, remove index.tsx
* Add the new files
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Remove pricing modal. Adjust everywhere to instead open mattermost.com/pricing. When air gapped, don't show buttons to view plans.
* Fix lint
* Further clean up of unused code. Fixes for linter
* Remove onboarding tasklist for previews, add Cloud previer banner
* Fixes for linter, i18n
* Revert dev lines
* Fix lint
* When below one minute, switch to seconds
* fix linter
* Add scaffolding for new Cloud Preview Modal
* Style updates
* Fix tests
* fixes for PR feedback
* useExternalLink for opening pricing modal with enriched params
* Fix i17n
* fix style
* Fix style, tests
* Fix linter, types
* Add file
* Make types even more fixed
* fix: correct test case for SKU label not provided scenario
The test "should not render SKU label when not provided" was incorrectly using baseContent which includes a SKU label. Fixed by creating contentWithoutSku that explicitly sets skuLabel to undefined to properly test the scenario where no SKU label is provided.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fine I'll do it myself
* fix linter
* Refactors
* Adjustments from PR review. Adjustments to video experience (poster/play button) and starting to translate
* Fix i18n
* Wrap translation strings with defineMessage for i18n extraction
- Add import for defineMessage and MessageDescriptor from react-intl
- Update type definition to use MessageDescriptor for better type safety
- Wrap all skuLabel, title, and subtitle objects with defineMessage() calls
- This ensures the i18n-extract tool can properly detect translation strings
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fix i18n
* Use regular modal close button
* Fix pipelines
* Fix i18n
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.tsx
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_controller.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Update webapp/channels/src/components/cloud_preview_modal/preview_modal_content.scss
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
* Remove unnecessary CSS properties from preview modal content
Remove display: flex, height: 100%, and flex-direction: column from .preview-modal-content selector as they have no effect per code review feedback.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Fixes for PR review
* Fix linter
* Fix i18n
* fix linter
* Changes to address Harrison's feedback
* change file name, remove index.tsx
* Add the new files
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
The `getSharedChannelsService` method was checking as well for the
Shared Channels to be active, which only the lead node of a cluster
is, so API operations that should run correctly like sharing/unsharing
a channel or inviting/uninviting a remote were returning a 400 bad
request.
This change updates the method to check for the Shared Channel service
to be active only on request, and on doing so it changes the error and
status code returned to indicate specifically that the service is
running but inactive, and returns a 500 as the situation is not an
error on the requester.
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit exposes audit logging functionality to plugins via the plugin API, allowing plugins to create and log audit records. Additionally, it addresses a gob encoding issue that could cause plugin crashes when audit data contains nil pointers or unregistered types.
* Refactor job retrieval to support multiple statuses & multiple types
- Updated job retrieval functions to handle multiple job statuses.
- Renamed `GetJobsByTypeAndStatus` to `GetJobsByTypesAndStatuses` for consistency across the codebase.
- Adjusted related function signatures and implementations in the job store and retry layer to accommodate the new method.
- Updated tests to reflect changes in job retrieval logic and ensure proper functionality.
* Add compliance export create command and tests
- Introduced `ComplianceExportCreateCmd` to facilitate the creation of compliance export jobs with options for date, start, and end timestamps.
- Added unit tests for the new command, covering various scenarios including valid and invalid inputs.
- Updated documentation to include usage examples and options for the new command.
- Enhanced existing tests to ensure proper functionality of compliance export job handling.
* update docs
* update tests for new logic
* Refactor message export job tests to use DefaultPreviousJobPageSize
- Updated all test cases in worker_test.go to replace hardcoded page size of 100 with DefaultPreviousJobPageSize for consistency.
- Adjusted the worker.go file to define DefaultPreviousJobPageSize and use it in job retrieval logic.
- Ensured that the changes maintain the functionality of job data initialization and retrieval tests.
* PR comments
* PR comments, simplifications, clarifications, formatting
* prefer hypen over underscore in command names
* merge conflict
* update mmctl docs
* add mmctl compliance export download command and tests
- Introduced `ComplianceExportDownloadCmd` to facilitate downloading compliance export files.
- Implemented the `DownloadComplianceExport` method in the Client interface for handling file downloads.
- Added unit tests for the download command, covering successful downloads, error handling for non-existent jobs, and retries on failure.
- Included end-to-end tests to validate the command's functionality.
- Updated documentation to include usage examples and options for the new command.
* don't know why this was left out
* PR comments
* adjust test for new retry logic
* refactored download fn for compliance_export and export
* fix test due to fixed logic
* docs
* Always require signatures for prepackaged plugins
We have always required signatures for packages installed via the marketplace -- whether remotely satisfied, or sourced from the prepackaged plugin cache.
However, prepackaged plugins discovered and automatically installed on
startup did not require a valid signature. Since we already ship
signatures for all Mattermost-authored prepackaged plugins, it's easy to
simply start requiring this.
Distributions of Mattermost that bundle their own prepackaged plugins
will have to include their own signatures. This in turn requires
distributing and configuring Mattermost with a custom public key via
`PluginSettings.SignaturePublicKeyFiles`.
Note that this enhanced security is neutered with a deployment that uses
a file-based `config.json`, as any exploit that allows appending to the
prepackaged plugins cache probably also allows modifying `config.json`
to register a new public key. A [database-based
config](https://docs.mattermost.com/configure/configuration-in-your-database.html)
is recommended.
Finally, we already support an optional setting
`PluginSettings.RequirePluginSignature` to always require a plugin
signature, although this effectively disables plugin uploads and
requires extra effort to deploy the corresponding signature. In
environments where only prepackaged plugins are used, this setting is
ideal.
Fixes: https://mattermost.atlassian.net/browse/MM-64627
* setup dev key, expect no plugins if sig fails
* Fix shadow variable errors in test helpers
Pre-declare signaturePublicKey variable in loops to avoid shadowing
the outer err variable used in error handling.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace PrepackagedPlugin.Signature with SignaturePath for memory efficiency
- Changed PrepackagedPlugin struct to use SignaturePath string instead of Signature []byte
- Updated buildPrepackagedPlugin to use file descriptor instead of reading signature into memory
- Modified plugin installation and persistence to read from signature file paths
- Updated all tests to check SignaturePath instead of Signature field
- Removed unused bytes import from plugin.go
This change reduces memory usage by storing file paths instead of signature data
in memory while maintaining the same security verification functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* add compliance export cancel command and tests
- Introduced `ComplianceExportCancelCmd` to allow cancellation of compliance export jobs.
- Implemented unit tests for the cancellation command, covering successful cancellation, error handling for non-existent jobs, and cancellation in non-cancellable states.
- Added end-to-end tests to validate the command's functionality in the E2E test suite.
* mmctl docs
* clean up example text; remove unneeded getJob
* fix tests
* fix tests, again.
* prefer hyphen for command naming
* update docs
* Add server version and edition (team vs ent) to ExternalLink component
* fix: add proper Redux state setup to datetime_input.test.tsx
The test was failing because the useExternalLink hook (added in this PR)
requires access to config and license Redux state, but the datetime_input
tests weren't providing proper initial state. This caused components to
receive undefined values from Redux selectors, potentially affecting
locale/date formatting behavior.
Added defaultState with proper config and license structure to match
what other tests in the codebase use, ensuring consistent test environment.
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* Revert to master
* Revert to master
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Nick Misasi <nickmisasi@users.noreply.github.com>
* MM-64299 - disable guest invite in abac channels
* filter the abac channel list for guest
* add filter in the back-end too
* add proper translation
* simplify the condition for enforced channels and add the unit tests
* enhance validation for not inviting guest users when abac enforced channel
* add missing translation
* add value to empty translation
* prevent showing the channel name if abac protected
* MM-64330 - filter abac users in channel invite
* implement cursor functionality for abac user filtering
* remove unnecessary comments
* refactor the backend implementation simplifying the functions
* refactor api to use opts as parameters, rename function
* add missing translation
* remove unnecesary test code
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
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 <noreply@anthropic.com>
* move category permissions to api
In https://github.com/mattermost/mattermost/pull/21038, we changed the
behaviour of the channel category store to filter out deleted teams and
teams for which the user was not a member. This was necessary in part
due to querying multiple teams via GraphQL.
With GraphQL no longer supported, let's move the permissions to the
API instead and remove the `JOIN` to filter out teams in the store.
Note that we /don't/ prevent access to deleted teams. For better or
worse, deleted teams remain largely accessible via other API endpoints
anyway.
* remove ExcludeTeam / GraphQL support
As part of https://github.com/mattermost/mattermost/pull/20353, we added
`ExcludeTeam` and the associated logic to support a GraphQL API.
With GraphQL no longer supported, let's simplify this logic and remove
the filtering and associated complexity.
* Fix shadow variable declaration in channel_store_categories.go
Fixed golangci-lint error by reusing existing err variable rather than shadowing it.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix build issue
* Remove SidebarCategorySearchOpts and simplify API to use teamID string
Per code review feedback, this change removes the SidebarCategorySearchOpts
struct entirely since the Type field was never used in the store implementation.
All methods now accept a simple teamID string parameter instead of the struct,
which simplifies the API and makes the code clearer.
Changes:
- Remove SidebarCategorySearchOpts struct from store.go
- Update CreateInitialSidebarCategories and GetSidebarCategories signatures
- Update all implementations (sqlstore, retrylayer, timerlayer, mocks)
- Update all callers to pass teamID string directly
- Clean up unused imports
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Remove redundant sidebar tests from TestChannelStore
* MM-63725 Refactor to split out getOrphanedSidebarChannels
* MM-63725 Populate multiple sidebar categories at once whenever possible
* Fix shadowing
* [MM-61582] Ensure textbox changes size when the window is too small
* [MM-61605] Fix clipping on menu modal in mobile view
* [MM-61622] Make mobile view RHS scrollable
* [MM-63029] Fix mobile view Browse Channels modal arrangement
* [MM-63026] Make new channel body scrollable if needed, flex to full screen on mobile view
* [MM-63059] Make Settings Modal properly responsive with flexbox for mobile view
* Fix lint
* [MM-64033] Fix mobile view for User Groups, another fix for Browse Channels
* Fix notification modal
* PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-62989] Replace channel purpose input with Input component
* [MM-63039] Fix styles so that a11y--focused box shadow is applied to the private/public channel buttons
* [MM-63033] Add aria-describedby and role=alert to the URL input on create channel modal
* Fix lint
* [MM-63035] Change legend to label, fieldset to div in the Input component
* Fix i18n
* [MM-64174] Stop propagation of enter event while editing the new channel
* [MM-63037] Add role=img and an aria label to the error img icon
* Fix snap
* Revert "[MM-63035] Change legend to label, fieldset to div in the Input component"
This reverts commit e8516f3e6a266c77db2b1695a036db717041a9ef.
* [MM-63040] Remove tabindex=0 from GenericModal wrapper, fix issue with URLInput that I caused D:
* Fix snap
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-63970] Add aria-live for creating a group, always use modal animation
* [MM-63978] Move my fix for multiselect remove button focus to the multiselect component
* [MM-63035][MM-64028] Change legend to label, fieldset to div in the Input component
* [MM-64019] Add fieldset and legend to Add people
* [MM-64026] Add required to Name and Mention boxes
* [MM-64023] Add results available aria-live area to multiselect
* [MM-64022] Restore original multivalueremove for users_email_input, use ariaLabelRenderer for Multiselect
* Use noteText for required for now
* Fix
* Fix e2e
* Only show required prompt when there are no users picked
* Fix cancel button submitting form
* PR feedback
* Do the required field for multiselect properly
* Other PR feedback
* Fix checks
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-63008] Make collapse button on search bar an actual button
* [MM-63004][MM-63020] Convert search box to floating-ui, fix some of the roles and labels that were incorrect
* [MM-63009] Add radiogroup and radio roles to the search box types
* [MM-63007] Ensure search box reads out number of results with suggestion items
* Fix playwright tests
* PR feedback
* Remove floating ui overlay
* Remove unnecessary .first() by being more specific about the search box
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: Replace 5% grace period with configurable ExtraUsers field
- Rename ExtraSeats to ExtraUsers in license Features struct
- Remove fixed 5% grace period and minimum 1 extra user logic
- Add configurable ExtraUsers field that allows exact control over additional seats
- Update calculateGraceLimit() to use extraUsers parameter directly
- When ExtraUsers is nil, defaults to 0 (hard cap with no overage)
- Special case maintained: zero user licenses always return 0 grace limit
- Update all tests to use new ExtraUsers functionality
Closes#31628
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* feat: eliminate calculateGraceLimit function, use inline baseLimit + extraUsers
- Remove calculateGraceLimit function and replace with inline calculation
- Allow extraUsers even when baseLimit is 0 (behavioral change)
- Update tests to reflect new behavior
- Remove TestCalculateGraceLimit since function no longer exists
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* feat: move ExtraUsers field to top level License struct
Move ExtraUsers field from Features struct to the top level License struct
for better organization and direct access. Update all references in limits.go
and limits_test.go to use the new field location.
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* feat: use model.NewPointer for creating integer pointers in tests
Replace inline function declarations with model.NewPointer calls for cleaner code.
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* feat: reorder ExtraUsers field to be after IsSeatCountEnforced
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* fix: format Go files with gofmt
- Remove extra blank line in limits.go
- Align struct fields in limits_test.go table test
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
* Fix user limits tests and document ExtraUsers field
- Fix TestCreateUserOrGuestSeatCountEnforcement to use ExtraUsers instead of old grace period
- Add documentation to ExtraUsers field explaining it as a grace mechanism
- Update test comments to reflect hard limit terminology
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hallam <lieut-data@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
When a user disconnects from the hub, we would spawn off a goroutine
which would make a cluster request, and then update the user status
as offline in the DB.
This was another case of unbounded concurrency where the number of
goroutines spawned was user controlled. Therefore, we would see
a clear spike in DB connections on master when a lot of users
would suddenly disconnect.
To fix this, we implement concurrency control in two areas:
1. In making the cluster request. We implement a counting semaphore
per-hub to avoid making unbounded cluster requests.
2. We use a buffered channel with a periodic flusher to process
status updates.
We also add a new store method to upsert multiple statuses
in a single query. The statusUpdateThreshold is set to 32, which means
no more than 32 rows will be upserted at one time, keeping the
SQL query load reasonable.
https://mattermost.atlassian.net/browse/MM-64298
```release-note
We improve DB connection spikes on user disconnect
by processing status updates in batches.
```
* [MM-63717] LDAP Wizard skeleton (#31029)
* add ldap_wizard component to render its admin components
* i18n
* test adjustment
* keys and props fixes
* title fix
* fix placeholders
* fix value initialization
* linting
* remove all ...props (except custom component); any->unknown
* fix i18n (temp, will be changed in later PR)
* better return; simplify function checking/calling
* [MM-64259] Sections sidebar and navigation (#31059)
* initial sections list sidebar
* sidebar highlighting and scroll on click
* some tidying up
* add custom section titles for section sidebar
* i18n
* updating border on sections
* scss style lint
* color -> border-color
* simplify activeSectionKey initialization; remove trailing newline
* add useSectionNavigation; clean up ldap_wizard and scss; PR comments
* extract section of code into renderSidebar()
---------
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
* [MM-64296] Add test connection for connection settings panel (#31190)
* button -> ldap test connect api
* fix console error by sanitizing value in text component
* return detailed error as error; adjust button -> primary, flushLeft
* middle of redesigning how we do hover text, first button
* add hover text to bools and file uploads
* i18n
* add LdapSettings as api type; add new endpoint to api yaml
* allow testing without first enabling LDAP and saving config
* i18n id changes
* improve TestLdapConnection to current standards
* PR comments
* safeDereference; cleaner returns
* remove hover markdown; formatting and typing simplification
* use button for "More Info"; i18n
* finish renaming help_text_hover -> help_text_more_info
* fix error output
* only send bindpassword if it has been changed
* fix: don't send blank bindPassword when it is still *****
* merge conflict
* [MM-64480] Refactor Admin Definition (#31280)
* move ldap definition to its own file for simplicity & context
* refactor admin_definition to eliminate circular dependencies
* merge conflicts
* before: buggy userHasReadPermissinOnSomeResources; after: fix incorrect snapshot
* merge conflict: new bindPasssword definition was left behind; fixed.
* merge conflict
* [MM-63765] LDAP Wizard: User filter expandable section (#31286)
* add "more info" hover to user filter help texts; make wider
* add expandable_setting type and component
* use Dislosure show/hide pattern for accessibility
* fix tooltip scss selectors
* fix hover -> more_info; make sure translation files are correct
* use join('\n\n') instead of the eslint disable line
* Revert "use join('\n\n') instead of the eslint disable line"
This reverts commit 274667e875b34703f14fee0706cd28b0125cefc9.
* [MM-64482] LDAP Wizard - Test User filters (#31312)
* initial cut at UI and backend for test filters
* api definitions; mocks
* clean up to current standards
* [MM-64512] - Test user filters UI (#31355)
* result_count -> total_count
* json cannot marshal error, returning error as string as god intended
* render errors with icon, hover text, and better feedback texts
* gather the settings that may be in expandable sections
* remove success, use error == "" to indicate success
* [MM-64536] LDAP Wizard: Test user attributes (#31373)
* LdapFilterTestResult -> LdapDiagnosticResult; FilterName -> TestName
* implement test_attributes endpoint and limited frontend (first step)
* adding EntriesWithValue
* [MM-64550] LDAP Wizard: Test user attributes UI (#31374)
* [MM-64551] LDAP Wizard: Test group attributes (#31375)
* remove Test LDAP button (not needed); reused helptext for other btn
* implement test_group_attributes endpoint; button/client-side paths
* [MM-64552] LDAP Wizard: Test group attributes UI (#31376)
* implement Test Group Attributes button
* simplify helper functions (improves useCallback dependencies)
* show the default filter that was used on the backend in the tooltip
* show the icon when there's an error (e.g. required filter/attribute)
* fix infinite rerendering
* fix error after failed save; fix navigation unlocked after save
* empty
* Adjust message feedback given we don't test the schema anymore
* improve css; don't use inline styles
* removed unneccesary pointer indirection
* improved i18n strings and logic
* combining filters/attributes/group attributes endpoints
improve types
* improve help text for User Filter (it's tricky)
* AvailableAttrs -> AvailableAttributes
* fix for e2e tests (renamed title)
* more e2e fixes
* skip broken e2e test
---------
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
* enforce License.IsSeatCountEnforced if set
If a license sets `IsSeatCountEnforced`, enforce the user limit therein
as a hard cap.
Fixes: https://mattermost.atlassian.net/browse/CLD-9260
* remove duplicate tests
* Improve user limit error messages and display
- Add separate error messages for licensed vs unlicensed servers
- Licensed servers: "Server exceeds maximum licensed users. ERROR_LICENSED_USERS_LIMITS"
- Unlicensed servers: "Server exceeds safe user limit. ERROR_SAFETY_LIMITS_EXCEEDED"
- Remove redundant "Contact administrator" text from activation errors shown to admins
- Fix system console to display actual server error messages instead of generic "Failed to activate user"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add license nil check and test coverage
- Add license != nil check in GetServerLimits to prevent panic
- Add test case to verify graceful handling of license being set to nil
- Ensures fallback to hard-coded limits when license becomes nil
Co-authored-by: lieut-data <lieut-data@users.noreply.github.com>
* Fix user limits tests to expect license-specific error IDs
Update test expectations to use the new license-specific error IDs:
- app.user.update_active.license_user_limit.exceeded for licensed server user activation
- api.user.create_user.license_user_limits.exceeded for licensed server user creation
Also update frontend to show actual server error messages instead of generic ones in system console.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove redundant license nil test
The test couldn't meaningfully verify nil license behavior since it relied on
hard-coded constants that can't be modified in the test.
Co-authored-by: lieut-data <lieut-data@users.noreply.github.com>
* Fix whitespace issue in limits_test.go
Remove unnecessary trailing newline to pass style checks.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* updated i18n
* s/ERROR_LICENSED_USERS_LIMITS/ERROR_LICENSED_USERS_LIMIT_EXCEEDED/, expand warning log
* Add 5% grace period for licensed user limits
- Add calculateGraceLimit() function with 5% or +1 minimum grace
- Apply grace period only to licensed servers with seat count enforcement
- Handle zero user licenses by returning zero grace limit
- Add comprehensive test coverage for grace period scenarios
- Unlicensed servers maintain existing hard-coded limits without grace
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix TestCreateUserOrGuestSeatCountEnforcement to account for 5% grace period
The test was failing because it expected user creation to fail at exactly
the license limit, but the implementation now includes a 5% grace period
before enforcement kicks in.
Changes:
- Update test cases to create users up to the grace limit (6 for a 5-user license)
- Add comments explaining the grace period calculation
- Both regular user and guest user creation tests now properly validate
enforcement at the grace limit rather than the base license limit
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix TestUpdateActiveWithUserLimits to account for 5% grace period
Update test expectations to match the new grace period behavior:
- At base limit (100) but below grace limit (105): should succeed
- At grace limit (105): should fail
- Above grace limit (106): should fail
This aligns the tests with the license enforcement implementation
that includes a 5% grace period above the licensed user count.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: lieut-data <lieut-data@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Fix join private channel not showing on all needed scenarios
* Fix for other two instances of the logic
* Fix test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adds support for GMs in shared channels
* Fix linter
* Remove creatorID from slack call
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* [MM-63041] Convert many inputs to the Input component, replace clientError with more correct client-side validation that conforms to the input
* Fix line length
* PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Upgrade Go to 1.24.3
Updates the following files:
- server/.go-version: 1.23.9 → 1.24.3
- server/build/Dockerfile.buildenv: golang:1.23.9-bullseye → golang:1.24.3-bullseye
- server/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3
- server/public/go.mod: go 1.23.0 → go 1.24.3, toolchain go1.23.9 → go1.24.3
Also fixes non-constant format string errors introduced by Go 1.24.3's stricter format string checking:
- Added response() helper function in slashcommands/util.go for simple string responses
- Removed unused responsef() function from slashcommands/util.go
- Replaced responsef() with response() for translated strings that don't need formatting
- Fixed fmt.Errorf and fmt.Fprintf calls to use proper format verbs instead of string concatenation
- Updated marketplace buildURL to handle format strings conditionally
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update generated mocks for Go 1.24.3
Regenerated mocks using mockery v2.53.4 to ensure compatibility with Go 1.24.3.
This addresses mock generation failures that occurred with the Go upgrade.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update to bookworm and fix non-existent sha
Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
* fix non-constant format string
---------
Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Stavros Foteinopoulos <stafot@gmail.com>
* Remove aria-live from SuggestionBox
aria-live isn't the idiomatic way to make the autocomplete accessible to
screen readers. Instead, we should've used aria-activedescendant which
was done for the at-mention autocomplete in a previous ticket, but that
didn't apply to other types of autocompletes. That lead to the
at-mention autocomplete being too noisy (as there were two different
things telling the user what the results were), and it meant that other
types of autocompletes didn't function.
This needs a couple direct followups:
1. The E2E tests need to be updated since they test for aria-live.
2. The Suggestion items for other types of autocompletes need IDs for
the aria-activedescendant to work.
* Consistently set IDs for all SuggestionList items
Instead of leaving it up to the individual Suggestion components,
this'll ensure that a11y support works for all of them going forward as
long as they properly forward other props to the underlying li element.
I would've preferred if each instance of SuggestionList had unique IDs,
but they currently all use the ID suggestionList, and I didn't want to
update that ID across 55 different Cypress tests. There's should only be
a single SuggestionList visible at a time, so the current situation is
fine enough.
* Remove textboxId from AtMentionProvider
* Change suggestion list to scroll using IDs instead of findDOMNode and refs
* Add an aria-label to SuggestionList
* Make all Suggestion components use the option role
* Add number of results to SuggestionList readout
* Change SuggestionBox to only set aria-expanded with results
* Add tests for ARIA of SuggestionBox
* Address feedback
Fix support packet caching issue by adding no-cache headers
Added Cache-Control headers to prevent browser caching when downloading support packets.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve claude code to run bash commands
With this limitation removed, it can do more things in a PR.
```release-note
NONE
```
* Update claude.yml
* fix indentation
```release-note
NONE
```
* add video type
* add video mime-type
* combine MIME type maps and update tests
* correct MIME type detection for video files
* format code
* lint fix
* simplified mimeType
* change avi mime type
* add avi type
* Attempt to make ESLint-Webpack integration work in all editors
* Reorder imports in Webpack config
This isn't validated by CI, but my local ESLint is complaining.
* MM-63411 Don't focus thread textbox automatically when it has a draft
* Add E2E test
* Add test files forgotten in previous commit
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* remove redundant button styles and use proper button classes
* remove import for contact_us css
* fix view plans button to be xs
* tweak to disabled state on save button in floating bar
* change contact us to tertiary button like before
* updated btn-full on free edition right panel
* update contact button to be primary when shown in the trial card
* fix issue with hover state on save changes panel error state
* fix style lint issues
* update snapshots
* fixed a few license page buttons
* fix lint issue
* Update index.test.tsx.snap
* add empty end lines
* fixed scope of css so it doesn't affect product switcher
* upate button font size for xs, update bg color for button in announce bar
* fix lint error
* update missed cancel buttons to use proper classes
* fixed text spec to find the right button
* updated snapshots
* fix issue with test on cancel button
* update snapshots
* Move from ubuntu to distroless image
* Update updated ubunty image for first stage
* Update server/build/Dockerfile
Co-authored-by: Daniel Schalla <daniel@mattermost.com>
* Update server/build/Dockerfile
Co-authored-by: Daniel Schalla <daniel@mattermost.com>
* Add mising env var for health check
* Add mattermost user in /etc/passwd
* Fix e2e userId
* use cypress in place of server. Wget and not curl
* Simplify e2e changes
---------
Co-authored-by: Daniel Schalla <daniel@mattermost.com>
* save arguments to state for later usage
* add test
* feat: Add tests for submitInteractiveDialog with channel and thread context
* fix: Add missing properties to DialogSubmission in integration_actions.test.ts
* feat: Add channel_id to DialogSubmission objects in test file
* refactor: Move selectedThreadIdInTeam to views.threads state
* add channel id to state
* add unit test
* add unit test
* update submitInteractiveDialog
* update tests for changes
* remove log line
* refactor: Enhance submitInteractiveDialog proxy action with improved error handling
* add userID to submit data to plugin
* remove log message
* remove unnecessary default state
* lint fixes
* update unit test
* fixes from code review
* fixes from code review
* fixes from code review
* fix test, add userID to expected
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
* Remove pricing modal. Adjust everywhere to instead open mattermost.com/pricing. When air gapped, don't show buttons to view plans.
* Fix lint
* Further clean up of unused code. Fixes for linter
* fixes for PR feedback
* useExternalLink for opening pricing modal with enriched params
* Fix i17n
* Fix style, tests
* Adds a feature flag and the logic to hide plugin interactions on shared channels
* Address review comments
* Fix CI
* Address review comments
* Address review comments
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
* adopt golangci-lint v2
No actual linting changes in this commit, just upgraded tooling and
directives to ignore new linter rules. Adopting v2 solves some
gosec issues in v1 and also happens to be a nice performance boost!
As part of this PR, we also drop support for `MM_NO_ENTERPRISE_LINT`
which hasn't been need for a while anyway.
* simplify: go install is fine!
* missing GOBIN
* golangci-lint: drop legacy preset exclusion
We've recently spent some effort improving websocket reconnection logic. With this commit, I've augmented the websocket reconnect metric to include a disconnect reason. This will help us measure the impact of these changes in production.
* TestPool
* Store infra
* Store tests updates
* Bump maximum concurrent postgres connections
* More infra
* channels/jobs
* channels/app
* channels/api4
* Protect i18n from concurrent access
* Replace some use of os.Setenv
* Remove debug
* Lint fixes
* Fix more linting
* Fix test
* Remove use of Setenv in drafts tests
* Fix flaky TestWebHubCloseConnOnDBFail
* Fix merge
* [MM-62408] Add CI job to generate test coverage (#30284)
* Add CI job to generate test coverage
* Remove use of Setenv in drafts tests
* Fix flaky TestWebHubCloseConnOnDBFail
* Fix more Setenv usage
* Fix more potential flakyness
* Remove parallelism from flaky test
* Remove conflicting env var
* Fix
* Disable parallelism
* Test atomic covermode
* Disable parallelism
* Enable parallelism
* Add upload coverage step
* Fix codecov.yml
* Add codecov.yml
* Remove redundant workspace field
* Add Parallel() util methods and refactor
* Fix formatting
* More formatting fixes
* Fix reporting
* [MM-63933] Don't include channels from an archived team unless specified in GetChannelsForUser
* PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-64316 Fix icon_emoji not working on webhook posts
* Add test case for custom emojis
* Remove unneeded test cleanup
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Deletes CPA values on CPA field type change
* Fix error method name reference
* Cleans the state when a CPA field's type is updated
* Fix types
* Fix linter
* Webapp no longer makes a decision on the change and server sents a flag in the WS message
* Fix linter
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* quote style exploration
* style tweak
* updated quote style
* Update _markdown.scss
* update value to match css
* fix linter issue
* changed reply bar to button-bg
* tweaks to compact mode
* a few more minor tweaks to spacing for compact mode and in edit preview mode
* fix lint issue
* add comment back in
* move to proper if statement for theme util
* reject MySQL with the enterprise advanced license
If a user attempts to set an Enterprise Advanced License while
configured with MySQL, reject the license. This SKU is not compatible
with MYSQL.
* fix trial typo
* suppress trial banner if MySQL
* Update server/channels/app/platform/license_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix types
* suppress mysql from show start trial modal
* Skip MySQL-incompatible tests for access control and channel banner features
Skip the following tests when running with MySQL database:
- Access control policy tests (create, get, delete, check/test expressions, search, assign/unassign, get channels)
- Channel banner tests in TestPatchChannel and TestCanEditChannelBanner
These features are not supported on MySQL and the tests would fail.
Tests will continue to run normally on PostgreSQL.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Skip TestSearchChannelsForAccessControlPolicy subtest for MySQL
Add MySQL skip logic to the "SearchChannelsForAccessControlPolicy with regular user"
subtest as this access control feature is not supported on MySQL.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* reject trial license requests for MySQL
* return false on sku + mysql match, even if logger is nil
* Fix MySQL trial license tests to skip appropriately based on database driver
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
* Convert user groups main modal to GenericModal, convert menu to Menu component, fixes
* Added useFocusTrap on other modals, fix DOM ordering
* [MM-64018] Add proper aria-labels to the menu button
* [MM-64025] Convert user group button to an actual button
* [MM-64017] Fixed aria-label on 3-dot menu in view user group modal
* [MM-64030] Show aria-live region when search results are rendered
* Fix tests
* PR feedback
* PR feedback
* fixed the url styling for webhooks to now use pure html instead of markdown
* remove code styling from outgoing webhook token
* updated test snapshots
* added code styling to more integrations tokens
* update snapshots
* fixed translation strings for english and german
* Fix notification message for posts with no text
Changed the default notification message from "did something new" to
"posted a message" for better clarity when receiving notifications
from posts with no readable text content.
Fixes: MM-61948
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* address feedback from code review
---------
Co-authored-by: Claude <noreply@anthropic.com>
* rm "No TEST_DATABASE... override" log message
Let's only log if this value is actually overridden.
* rm "(Created|Dropped) temporary database" message
* only log "Pinging SQL" on subsequent attempts
* disable morph logging from TestMain
* Fix style issues in store test files
- Add missing parameter to migrate() function calls in tests
- Remove unused log function in settings.go
- Fix formatting with go fmt
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* within sqlstore, use "enable" vs "disable" for clarity
* remove trailing newline from morph logs
---------
Co-authored-by: Claude <noreply@anthropic.com>
* [MM-28779] Fix errcheck issues in server/channels/app/brand.go
Remove brand.go from the errcheck exclusion list in .golangci.yml and fixed the error by properly handling the return value from a.MoveFile().
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* [MM-28779] Add test to verify brand image backup functionality
Add a new test that verifies backup of the original brand image happens when a new one is uploaded. This helps to ensure the fix for errcheck issues is working as expected.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* use seperate temporary filestore for each test
* Use FileSettings.Directory instead of finding the dir programatically
* Fix another test
* Fix defer
* Update server/channels/api4/job_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix bad bot commit
* Cleanup logs message
* cleanup file path
* Fix error variable names
* WIP:cleanup panic ussage
* Revert "WIP:cleanup panic ussage"
This reverts commit c3284e4427a41c818acc161926cd2535dee9a6b9.
* cleanup error checks
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
(*Busy).Set would set its own timer, and additionally
send a message across the cluster. In this case, the cluster
is mocked locally. But the timer calculation happens again.
We marshal the expiry time with b.expires.Unix() and send that
as part of model.ServerBusyState. This is parsed again in
ClusterEventChanged and converted to duration with time.Until.
Therefore, if it takes longer for the code to reach those lines,
then the new time calculated would have already expired, failing
the test.
To fix this, we increase the timeout. This slows down the test
at the cost of extra reliability. This is a common failure point
with any timer related tests.
Additionally, we also change the condition in compareBusyState
to check for less-than rather than strict equality.
https://mattermost.atlassian.net/browse/MM-63300
```release-note
NONE
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63925 Remove most nested transactions from channel_store_categories.go
There's one place which still has a nested transaction in
CreateInitialSidebarCategories, but that's because it's calling out to a
different part of the store. The only way to avoid that would be to
break the extraction like UpdateSidebarCategories does to update
preferences, but I chose not to follow that pattern here and leave it
as-is.
* MM-63923 Prevent deadlocks caused by updating multiple categories in a different order
* MM-63923 Prevent deadlocks while deleting from SidebarChannels
This could also have been resolved by sorting the categories, but
combining the queries seems a bit more elegant.
* MM-63924 Ensure adding SidebarChannels rows is idempotent
* Add additional test to cause deadlocks
* Prevent channels from appearing in a single category multiple times
* Other review feedback
* Added user over usager alert in License and System Statistics page
* Fixed case below 90
* Fixed constant
* Linting
* Change over user notification threshold to 0
* Fix tests
* Saved dismissed preference
* Text tweek
* Fix tests
* More tests fixed
* Snapshot updated
* initial implementation of test documentation in spec file with AI-assisted prompt from Claude and linter script
* update snapshots
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63966 - save pannel not dissapearing after save
* adjust unit tests
* trim only on direct change
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Bump prepackage Zoom plugin version to 1.9.0
* Bump prepackage GitLab plugin version to 1.10.0
* fixed zoom version
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-62980] Set aria-describedby for Input component when again custom message is set
* [MM-62970] Change password reset send link input to Input
* Fix i18n
* Fix e2e
* fix snapshots
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
* MM-63406: Update timezone automatically
On focus as well as every 30 minutes, check if the timezone has changed.
Also, ignore the momentjs cache, otherwise this value is static as per https://momentjs.com/timezone/docs/#/using-timezones/guessing-user-timezone/
> By default Moment Timezone caches the detected timezone. This means that subsequent calls to moment.tz.guess() will always return the same value.
* migrate away from enzyme
* MM-63406: Address PR feedback - add constants and improve comments
* MM-63406: Address PR feedback - Extract timezone logic to a separate component
- Created a new TimezoneManager component for handling timezone updates
- Used fake timers in tests to properly test the periodic update
- Removed visibility change handler to simplify the component
* fix linting
* Remove comments from getBrowserTimezone function
* Move updateTimezone function before useEffect
* Simplify timezone detection with Intl.DateTimeFormat().resolvedOptions().timeZone
* Fix style issues
* Improve timezone manager tests with jest.getTimerCount()
Used jest.getTimerCount() to verify timer cleanup on unmount instead of spying on clearInterval.
This change addresses PR feedback in #30856.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-63406: Simplify timezone updates to check every minute
- Simplify timezone manager by removing focus event and only checking every minute
- Replace 30-minute interval with 1-minute interval for more responsive timezone detection
- Update tests to match new implementation
- Change removes focus/blur event handling as per PR feedback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* revert to simpler approach
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Claude <noreply@anthropic.com>
* MM-63968 - remove channel name input plus one
* adjust test to most common use in webapp
* adjust error for min lenght and add back minlenght indicator under a param bool value
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63965 - add scroll to advanced text editor
* show scroll only when content wraps in more than one line
* fix unit test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adds the capability to retrieve a property field by name
Allows to retrieve a property field by name and groupID. As the name
is only unique within the context of a group, and we can have multiple
fields with the same name in the store, for this method the groupID is
directly included in the query instead of being an optional field.
* Adds the targetID parameter to correctly filter fields
* Ensure the method only retrieves non-deleted fields
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
A recent change to the enterprise cluster code introduced the possibility that we could get cluster info with empty fields. This happens when we can't properly communicate with the related cluster node. In that case, we now show a warning to the admin.
A recent change to the enterprise cluster code introduced a change to the enterprise API interface. GetClusterInfos() can now return an error. This commit introduces code to handle that error.
* [MM-63000] Use CSS hover state instead of component state, add focus-within to ensure buttons are focusable
* [MM-63046] Allow draft panel to be correctly focusable and navigable using correct roles
* [MM-63046] Use `name` as `aria-label` for `Action`
* update locator for scheduled drafts and fix failing playwright tests
* fix lint
* PR feedback
* PR feedback
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
On page load, we load ALL channels and channel members from all teams.
But then, on team_switch, we would again load channels and channel
members from that team. This was redundant and mainly kept
because previously the websocket events were considered unreliable.
Now with reliable websockets, and client-side pings, we can detect
broken connections faster and recover without loss.
Additionally, the getAllChannelMembers call would page through
all responses on the client side. This was inefficient and incur
extra latency. To optimize for this, we introduce server-side
streaming of the full response if page is set to -1.
This optimizes the intial response as well.
https://mattermost.atlassian.net/browse/MM-56906
```release-note
Optimize team switch operation by removing calls to get channels
and channel members.
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-62973] Fix order of Close button and other buttons in the header
* [MM-63028] Add aria-live status area when searching for channels
* [MM-63027] Add announcement that channel is joined
* [MM-63034] Add role=checkbox and reformat HTML to have correct custom checkbox code
* Update snapshots from generic_modal change
* PR feedback
* PR feedback
* PR feedback
* [MM-62975] Convert results table to actual table instead of divs
* [MM-62981] Ensure remove user button is focusable
* fix playwright test
* fix playwright test
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
We switch to using iterators introduced in Go 1.23
to make iteration alloc-free and fast. And since
element removal is allowed while iterating a map,
this also means we don't need to even copy the slice
any more.
While here, we also address the comment https://github.com/mattermost/mattermost/pull/30178#discussion_r1954862151.
I have simply gone back to using []string as the map
entry rather than a type alias or a redirection with
a struct.
https://mattermost.atlassian.net/browse/MM-63130
```release-note
NONE
```
* Changed back nil to len
```release-note
NONE
```
* fixing unused assignment
```release-note
NONE
```
* add benchmark
```
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost/server/v8/channels/app/platform
cpu: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
HubConnIndexIterator/2_users-8 93.53n ± 1% 38.09n ± 1% -59.27% (p=0.000 n=10)
HubConnIndexIterator/3_users-8 106.30n ± 0% 38.41n ± 1% -63.86% (p=0.000 n=10)
HubConnIndexIterator/4_users-8 111.30n ± 1% 38.66n ± 1% -65.27% (p=0.000 n=10)
geomean 103.4n 38.39n -62.89%
│ old.txt │ new.txt │
│ B/op │ B/op vs base │
HubConnIndexIterator/2_users-8 16.00 ± 0% 24.00 ± 0% +50.00% (p=0.000 n=10)
HubConnIndexIterator/3_users-8 24.00 ± 0% 24.00 ± 0% ~ (p=1.000 n=10) ¹
HubConnIndexIterator/4_users-8 32.00 ± 0% 24.00 ± 0% -25.00% (p=0.000 n=10)
geomean 23.08 24.00 +4.00%
¹ all samples are equal
│ old.txt │ new.txt │
│ allocs/op │ allocs/op vs base │
HubConnIndexIterator/2_users-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
HubConnIndexIterator/3_users-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
HubConnIndexIterator/4_users-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
geomean 1.000 1.000 +0.00%
¹ all samples are equal
```
```release-note
NONE
```
* ForChannel test as well
```release-note
NONE
```
* review comments
```release-note
NONE
```
* fix lint errors
```release-note
NONE
```
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit introduces listeners for network changes that will:
- Test the websocket if we get an offline event to check if we have disconnected.
- Re-connect the websocket immediately if we get an online event, and we are disconnected.
Additionally when a ping fails, we now immediately call the onclose() callback instead of waiting for the system to trigger it when the broken websocket closes. This allows us to re-connect much more quickly (since we don't have to wait for the broken websocket to get cleaned up by the system).
* First set of texts updated for Enterprise Adv upsells and trial
* Updated upsell message for all tiers
* Linting translation file
* Linting
* Reverting unintended styling changes
* my ide making lint more
* Fix tests
* More default texts updated
* Trial banner title
* Make advantages list translatable
* Text updates
* Fix tests
* More text tweaking
* Linting
* Reodered translations
* Fixed e2e test
* More linting
* Removed incorrect new test
* Fix test typo
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
For our MySQL customers, we have discovered that the query is not
able to choose the right plan by itself without adequate hints.
This is only for MySQL as we have confirmed from multiple customers
that Postgres takes the right index idx_sidebarcategories_userid_teamid
for the sidebarCategories table. And if it doesn't, then a VACUUM ANALYZE
fixes it.
But for MySQL, we have to do two things:
- Pass an index hint to let it use idx_sidebarcategories_userid_teamid.
- Pass an optimizer hint to materialize the sub-query. This is used
to materialize the doesNotHaveSidebarChannel sub-query into a temporary
table, letting MySQL reuse the contents of the table for further processing
in the parent sections of the query.
I have confirmed both locally and in the customer environment
that it gives a clear benefit.
*LOCAL*
OLD:
```
| -> Nested loop antijoin (cost=2889.85 rows=19767) (actual time=3.355..38.033 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.410..1.689 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.394..0.886 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.389..0.793 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.003 rows=1 loops=220)
-> Nested loop inner join (cost=4967.50 rows=180) (actual time=0.165..0.165 rows=1 loops=220)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=Channels.Id) (cost=7.86 rows=180) (actual time=0.055..0.062 rows=13 loops=220)
-> Filter: ((SidebarCategories.TeamId = 'team01') and (SidebarCategories.UserId = 'user000')) (cost=44.93 rows=1) (actual time=0.008..0.008 rows=0 loops=2881)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=SidebarChannels.CategoryId) (cost=44.93 rows=1) (actual time=0.006..0.006 rows=1 loops=2881)
|
```
NEW:
```
| -> Nested loop antijoin (cost=5879.73 rows=58021) (actual time=1.544..3.135 rows=15 loops=1)
-> Nested loop inner join (cost=66.65 rows=110) (actual time=0.421..1.778 rows=220 loops=1)
-> Filter: ((Channels.DeleteAt = 0) and (Channels.`Type` in ('O','P'))) (cost=25.25 rows=110) (actual time=0.405..0.945 rows=220 loops=1)
-> Index lookup on Channels using idx_channels_team_id_display_name (TeamId='team01'), with index condition: (Channels.Id is not null) (cost=25.25 rows=220) (actual time=0.400..0.859 rows=220 loops=1)
-> Single-row covering index lookup on ChannelMembers using PRIMARY (ChannelId=Channels.Id, UserId='user000') (cost=0.28 rows=1) (actual time=0.003..0.004 rows=1 loops=220)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=Channels.Id) (cost=130.37..130.37 rows=1) (actual time=0.006..0.006 rows=1 loops=220)
-> Materialize with deduplication (cost=130.35..130.35 rows=527) (actual time=1.118..1.118 rows=205 loops=1)
-> Filter: (SidebarChannels.ChannelId is not null) (cost=77.61 rows=527) (actual time=0.059..0.851 rows=523 loops=1)
-> Nested loop inner join (cost=77.61 rows=527) (actual time=0.058..0.786 rows=523 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='user000', TeamId='team01') (cost=2.81 rows=15) (actual time=0.025..0.031 rows=15 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=SidebarCategories.Id) (cost=1.70 rows=35) (actual time=0.032..0.046 rows=35 loops=15)
```
Performance improvement from 38ms to 3ms.
*CUSTOMER ENV* (with sensitive data wiped off)
OLD:
```
| -> Sort: channels.DisplayName (actual time=512..512 rows=5 loops=1)
-> Stream results (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop antijoin (cost=3.28 rows=1.44) (actual time=223..512 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.025..0.0878 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0146..0.023 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00999..0.0102 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.00778..0.00785 rows=1 loops=6)
-> Nested loop inner join (cost=2.85 rows=4.81) (actual time=102..102 rows=0 loops=5)
-> Covering index lookup on SidebarChannels using PRIMARY (ChannelId=channelmembers.ChannelId) (cost=2.01 rows=4.81) (actual time=0.0125..13.8 rows=24134 loops=5)
-> Filter: ((sidebarcategories.TeamId = '') and (sidebarcategories.UserId = '')) (cost=1.54 rows=1) (actual time=0.00359..0.00359 rows=0 loops=120671)
-> Single-row index lookup on SidebarCategories using PRIMARY (Id=sidebarchannels.CategoryId) (cost=1.54 rows=1) (actual time=0.00316..0.00319 rows=1 loops=120671)
```
NEW:
```
Here is the output
| -> Sort: channels.DisplayName (actual time=0.12..0.12 rows=5 loops=1)
-> Stream results (cost=3.45 rows=4.01) (actual time=0.0797..0.11 rows=5 loops=1)
-> Nested loop antijoin (cost=3.45 rows=4.01) (actual time=0.0769..0.106 rows=5 loops=1)
-> Nested loop inner join (cost=3.02 rows=0.3) (actual time=0.0291..0.0555 rows=5 loops=1)
-> Covering index lookup on ChannelMembers using idx_channelmembers_user_id_channel_id_last_viewed_at (UserId='') (cost=0.916 rows=6) (actual time=0.0145..0.0162 rows=6 loops=1)
-> Filter: ((channels.DeleteAt = 0) and (channels.TeamId = '') and (channels.`Type` in ('O','P'))) (cost=0.251 rows=0.05) (actual time=0.00611..0.00619 rows=0.833 loops=6)
-> Single-row index lookup on Channels using PRIMARY (Id=channelmembers.ChannelId) (cost=0.251 rows=1) (actual time=0.0053..0.00534 rows=1 loops=6)
-> Single-row index lookup on <subquery2> using <auto_distinct_key> (ChannelId=channelmembers.ChannelId) (cost=7.01..7.01 rows=1) (actual time=0.00956..0.00956 rows=0 loops=5)
-> Materialize with deduplication (cost=7..7 rows=13.4) (actual time=0.0451..0.0451 rows=0 loops=1)
-> Filter: (sidebarchannels.ChannelId is not null) (cost=5.66 rows=13.4) (actual time=0.0441..0.0441 rows=0 loops=1)
-> Nested loop inner join (cost=5.66 rows=13.4) (actual time=0.0439..0.0439 rows=0 loops=1)
-> Covering index lookup on SidebarCategories using idx_sidebarcategories_userid_teamid (UserId='', TeamId='') (cost=0.592 rows=3) (actual time=0.0105..0.0134 rows=3 loops=1)
-> Covering index lookup on SidebarChannels using idx_sidebarchannels_categoryid (CategoryId=sidebarcategories.Id) (cost=1.39 rows=4.46) (actual time=0.00999..0.00999 rows=0 loops=3)
```
Performance improvement from 512ms to 0.12ms.
https://mattermost.atlassian.net/browse/MM-64209
```release-note
NONE
```
* [MM-62987] Include description on aria-label for last reply time, make link focused when using up/down arrows.
* PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-62974] Focus team name inputs when error occurs
* [MM-62984] Change h5 to label on create team screens
* [MM-63016] Add a page title for the create team page
* [MM-63025] Add role=alert and aria-describedby for error messages on create team page
* Fix i18n
* [MM-62986] Ensure focus goes back to the inputs after an error for Login/Create Account/MFA
* [MM-63011] Show outline on Mattermost logo link when focused
* [MM-63018] Remove tabindex from the login/signup cards and use <form> element for submit
* [MM-63014] Toggle aria-label when show/hide password is pressed
* [MM-63013] Mention the field name when showing an error message about the password field
* Fix lint
* Update screenshots and fix tests
* Update screenshots and fix tests
* Fix tests
* Update webapp/channels/src/components/mfa/setup/setup.tsx
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* update screenshots
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* Fixed save state panel for channel banner
* Defined default background color
* Updated test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Make the Mobile Security settings available on Enterprise Advance
* rename to minLicenseTier
* used license tier checks in system console
* lint fix
* renamed license in test
* Made license name display in single line
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* MM-63649 - fix preview embeded images
* enhance utils function and simplify validations in file preview modal component
* add new test for proxied images without extension
* simplify logic; apply DRY unifying it via helper function
* if extension is available in file info, use it first
* add extra validation for the extension lenght if fileInfo.extension is present
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63648 - markdown images sometimes do not show the more button
* migrate test to testing-library and remove unnecesary props
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Prevents the API from updating synced CPA values
The patch functions for CPA values now accept a parameter that checks
if they should allow for synced values to be updated, and prevent
those updates if necessary
* Fix linter
* Fix parameter after merge
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63056 Add accessible name to Threads item menus
* MM-63058 Add accessible name to Threads mark as unread button
* MM-63049 Change Threads list to use tab pattern for filtering
* Revert accidentally added i18n string
With some neat generics, I was able to refactor
the scanning to a util function. I used it to
refactor 3 places and also removed an unnecessary method.
Claude was quite good here.
https://mattermost.atlassian.net/browse/MM-62755
```release-note
NONE
```
* Stop emoji picker header from overlapping tabs
* Move emoji picker header above tabs
There was also some stuff I could remove because the header will always
be visible.
* Don't scroll the emoji picker on hover
* MM-61611 Fix emoji picker tabs being covered in mobile view
* Improve layout of emoji picker and gif picker
A lot of the emoji picker was explicitly sized before which made it
difficult to make everything responsive in mobile view. Making the emoji
picker layout into a flexbox fixed that, but due to the way that it's
nested, that was a bit tricky, and it required a couple tricks:
1. The AutoSizer doesn't work if it's placed inside a flexbox container,
but you can fix that by putting a div with position: relative in
between it and the flexbox parent. That was already the case, but I
accidentally removed it while trying to sort out the seemingly
excessive nesting.
2. Children of flexbox elements will cause the parent to expand if they
don't have min-height/min-width set. That's because the default
value for those is 0 outside of flexbox, but it's auto inside of one.
This breaks the layout and animation of the skin tone selector in the
emoji picker, but that has issues on master as well, so it'll be
addressed in the next commit.
* Improve and fix opening animation for skin tone selector
While this looked worse before in mobile view, it had some weirdness in
desktop as well. I ended up rewriting the way that that animation worked
so that I could position it correctly in both mobile (where it doesn't
cover the input) and desktop (where it does).
Notably, that change required:
1. Changing the skin tone selector to wait until its contents are hidden
to unmount them so that the position and size could be calculated
correctly.
2. Removed the flexbox from the search row and used a margin to make the
skin tone button pretend to offset the input. That let us smoothy
expand the selector over the input without having the input resize
behind it.
* Update CSS for positioning emojis and headings in emoji picker
* Add report a problem type and allow logs config
* Improve device type logic
* Add tests and minor fixes
* Add texts
* Fix tests by avoiding circular dependencies
* Fix test
* Fix useexternallink updating mailtos, and changing the content of query parameters
* Fix texts
* Fix e2e test
* Fix tsc
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
INSERT IGNORE will ignore ALL errors in the INSERT statement.
This is not what was intended. The right way is to do a
redundant update on duplicate key.
It's not great, but that's how MySQL wants us to do it.
https://mattermost.atlassian.net/browse/MM-63878
```release-note
NONE
```
* pageup/pagedown button scroll for center post-list
* revert package.json
* changing id, using ? and returning in keyHandler
* added e2e test for pageup/pagedown scroll
* Fix dynamic-virtualized-list not being in lockfile and update path
Moving the package under the MM namespace wasn't necessary, but it stops
some warnings from NPM.
* Move E2E test from Cypress to Playwright
Cypress's cy.type doesn't seem to properly trigger browser functions
because it doesn't seem to use native keyboard events. A newer version
of Cypress has a new cy.press method which is supposed to use native
keyboard events, but it also only supports the tab key currently, so it
wouldn't be useful here.
* Fix new test on iPad
* Add page up/down support to RHS and Threads view
* Update type definitions for dynamic-virtualized-list
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* MM-61590 - trap focus in modals
* Adjust focus trap for dynamic loading elements and multi modal support
* add tests and improve code in generic modal
* fix snapshot
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-61173 - channel settings modal: base modal, initial commit, file creation and base component
* new enhancements to the base modal creation
* revert changes on textbox_links and edit channel header
* fix types and add back unintentioned deleted value
* add the preview textbox component
* extract logic for info tab into its own component
* add the purpose input to the window
* move other component logic to its own component and code clean up
* ability to update channel type
* more advances on the archive channel tab
* fix unit test in textbox
* fix translations
* do not show the archive modal in default channel
* fix issue with url editor not being resetted on undo action
* adjust text and styling for the header and purpose inputs
* remove textboxlinks and use button eye icon
* adjust test and preview button style
* add unit test to channel patch
* move logic from parent modal to info tab component
* fix border issues and focus back to preview textareas
* prevent saving changes when pressing enter when selecting an icon
* enhance input component to cover limits validations and enhances tests
* set default error message for save changes panel
* add props to provide custom value to the buttons
* remove channel input errors on reset button click
* create new component settings textbox
* rename component to advanced textbox and add unit tests
* styling of the info tab and add error state to advanced textbox
* add logic to prevent tab switch with unsaved changes
* adjust url error logic and code clean up
* code clean up and enhance comments
* add char min length to advanced textbox logic
* add the channel settings modal to the new menu
* add new test files and fix reset error
* remove unused error variables
* adjust translations and remove unncesary import
* enhance permissions for archive channels and manage channel settings
* Adjust permission tree so channel admins can convert from private to public
* enhance the test suit around channel conversion type
* fix some e2e tests and solve channel input name issue
* fix unit test by interacting first with the input element
* adjust e2e tests to channel settings modal changes
* remove commented tests and implement pr feedback
* adjust more pr feedback to the code
* more pr feedback enhancements
* further enhancements to tab navigation, and adjust more e2e tests
* remove unused components and fix e2e tests
* revert unnecessary permissions changes
* Add name label to textboxes
* adjust e2e and unit tests
* revert min lenght change value and adjust tests and snapshots
* Channel banner settings (#30721)
* Added channel banner setting header
* Updated section styling
* handled animation
* handled min and max lengths
* cleanup
* color change fix
* general improvements
* Fixed API test
* removed unused param className
* added e2e tests
* test: add channel settings configuration tab test file
* Based on the context, here's a concise commit message for this change:
feat: Add comprehensive tests for ChannelSettingsConfigurationTab
* added some more tests
* CI
* reverted package-lock.json changes in Playwright
* remove extra border from advaced textbox
* adjust styling for name label in advance texbox and restart preview state on modal close
* sync package.lock in playwright
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
* [MM-63023] Conditionally make thread item elements focusable based on whether they have an interaction
* Fix i18n & PR feedback
* Remove focusability from the text preview div
* Fix tests
* avoid SELECT * in command stores
* Define column names once and reuse as columns list in selects and inserts
* Define column names once and reuse with ExecBuilder
* Replace usage of react-popper in onboarding with floating-ui
* Remove direct dependency on react-popper
Compass components still depend on react-popper, but none of the web app
code does any more.
* Remove direct dependency on popper.js
* Remove unneeded dependency on @types/bootstrap and remaining indirect dependency on popper.js
Every time we load the RHS, we used to load the FULL thread always. Although
the actual ThreadViewer React component is virtualized, and the server side
API call is paginated, we still went through all the pages, to get the full
thread and passed it on to the ThreadViewer. This would be for first loads,
and subsequent loads of the same thread.
This was a bug originally, but then it was a necessity after we applied websocket event scope because
now we won't get emoji reactions of a thread if the user is not on the thread.
To fix that, we enhance the thread loading functionality by adding support for fetching
thread updates based on the UpdateAt timestamp. Now, for subsequent loads,
we only get the changed posts in a thread. The implementation:
- Adds new API parameters: fromUpdateAt and updatesOnly to the GetPostThread endpoint
- Updates database queries to support sorting and filtering by UpdateAt
- Implements thread state management to track the last update timestamp
- Adds client-side support to use incremental loading for improved performance
- Ensures proper validation for parameter combinations and error handling
This change enables more efficient thread loading, particularly for long threads
with frequent updates, by only fetching posts that have been updated since the
last view.
Caveats: For delta updates, the SQL query won't use the best index possible
because we have an index for (CreateAt, Id), but no index for (UpdateAt, Id).
However, from my tests, it is not as bad as it looks:
```
[loadtest] # EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM Posts WHERE Posts.DeleteAt = 0 AND Posts.RootId = 'qbr5gctu9iyg8c36hpcq6f3w8e' AND Posts.UpdateAt > 1623445795824 ORDER BY UpdateAt ASC, Id ASC LIMIT 61;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=8.31..8.31 rows=1 width=216) (actual time=0.047..0.049 rows=0 loops=1)
Buffers: shared hit=2
-> Sort (cost=8.31..8.31 rows=1 width=216) (actual time=0.044..0.045 rows=0 loops=1)
Sort Key: updateat, id
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=2
-> Index Scan using idx_posts_root_id_delete_at on posts (cost=0.28..8.30 rows=1 width=216) (actual time=0.031..0.032 rows=0 loops=1)
Index Cond: (((rootid)::text = 'qbr5gctu9iyg8c36hpcq6f3w8e'::text) AND (deleteat = 0))
Filter: (updateat > '1623445795824'::bigint)
Buffers: shared hit=2
Planning:
Buffers: shared hit=3
Planning Time: 0.508 ms
Execution Time: 0.106 ms
(14 rows)
```
We still get an index scan with index cond. Although there's a filter element, but atleast we get the whole thread with the index.
My thinking is that while the whole thread might be large, but after that, updates on a thread should be incremental.
Therefore, we should be okay without adding yet another index on the posts table.
This is just the first step in what could be potentially improved further.
1. We shouldn't even be loading the full thread always. But rather let the virtualized viewer
load more posts on demand.
2. If a post has been just reacted to, then we need not send the whole post down, but just the
reaction. This further saves bandwidth.
https://mattermost.atlassian.net/browse/MM-56548
TBD: Add load-test coverage to update the thread loading code
```release-note
NONE
```
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Reject emails within angle brackets
mail.ParseAddress is RFC-compliant, which means that it accepts emails
with names, as in "Billy Bob <billy@example.com>". It even accepts this
form *without* a name; e.g. "<billy@example.com>". We want to store the
plain address, so we compare the user input with the Address field of
the result from mail.ParseAddress, which should contain only
"billy@example.com", thus only accepting emails that do not contain
names nor angle brackets.
* Log a warning for admins with clear next steps
* Fix wording of comment
* And a typo
* Add specific command example to log message
* Add input email to log message
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Add license load metric endpoint and UI indicator
Adds an API endpoint to calculate and return license usage as a load metric, and displays this metric in the About dialog. The metric is calculated as (MAU/licensed users)*100.
Additionally:
- Renamed function to be consistent with API endpoint name
- Added proper i18n strings for error messages and UI elements
* Fix TypeScript null check in about_build_modal.tsx
* MM-63728: Update OpenAPI documentation for license load metric
Update the OpenAPI documentation and code comments to correctly describe the license load metric calculation as using a multiplier of 1000 instead of percentage.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-63728: Use float for license load metric calculation
Modify the license load metric calculation to use floats throughout the computation process while still returning an integer result. This maintains the existing API but improves the precision of the calculation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* improve tests manually
* Update server/channels/api4/license_test.go
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
* Update server/channels/api4/license_test.go
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
* add e2e tests for custom profile settings
* fix failed tests
* reorg folder and file convention, and add more details of the tests
* add e2e-tests for custom profile attributes in profile popover
* cleanup
* add test keys, move to folder of feature and move common function and constants to helper file
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63313 Make theme setting radio buttons horizontal and update text
* MM-63313 Add Playwright test for a11y of theme settings
* Update snapshot
* Run prettier on E2E tests
* Address feedback
* Ensure new test reliably passes on Firefox
For whatever reason, Firefox lets you tab onto the Sidebar Styles panel
while it's expanding, possibly because it's a scrollable container with
overflowing content or because other browsers don't register the
children of that panel as visible while the panel is animating open.
Either way, we can look at the CSS on the panel to confirm when the
transition is done.
* Revert previous changes made to premade theme label alignment and size
In the last PR, these were changed from generic divs to buttons, and the
default browser style for buttons adds some extra padding and centres
the button text by default, so we have to override that.
* Adjust margins on inline radio group
* Fix playwright test code styling
* Fix bad import in E2E tests
When Elasticsearch/Opensearch was in enterprise repo,
we had to bump up the runners: 9b151defcc.
However, the ES code was move inside server repo,
but the test runners were not changed. This led to frequent
test failures. So we are bumping up the test runners.
This will unfortunately lead to an increased cost, but
we have also cut down in other places viz. the build phase
uses the free runner now (https://github.com/mattermost/mattermost/pull/29297).
And the enterprise build also uses free runner (https://github.com/mattermost/enterprise/pull/1792).
```release-note
NONE
```
This change automatically removes options and sync attributes when
sanitizing fields that don't support them. As per values, it returns
an error when the value for a text type field is longer than the 64
characters limit we're currently applying.
The PR fixes a bug on the create CPA field endpoint that was causing
the attrs of the CPAField not to be decoded correctly.
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* feat: Add certificate upload option for audit logging settings
* Commit current changes
* Additions
* MM-62944 Fix fileupload settings not being clickable
* Support for uploading a cert for experimental audit logging cert. Pre cloud implementation in the backend
* Forgot to add new hook
* Add support for setting custom audit log certifcates in Cloud
* Permissions
* I18n
* Change order
* Linter fixes
* Linter fixes, add openapi spec
* additions for openapi
* More openapi fixes because it won't run locally
* Undo, cursor went rogue
* newline fix
* Align types properly
* Fix i18n
* Fix i18n AGAIN
* Fix error
* Update api/v4/source/audit_logging.yaml
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* add e2e tests for custom profile settings
* fix failed tests
* reorg folder and file convention, and add more details of the tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62005 Remove FloatingFocusManager from PluginLinkTooltip
* Update tests to define more realistic plugin components
* Revert "Update tests to define more realistic plugin components"
This reverts commit c23307112c2bc5091b931980885cc79e4b945ff8.
* Revert changes to DeepPartial
* Use class component for test component
* test PermissionView semantics
* change required ancillary permissions
`PermissionSysconsoleReadReportingTeamStatistics` doesn't strictly need `PermissionViewTeam`, but can work with whatever teams the user has access to.
* remove unnecessary timeouts
* remove redundant comment
* update snapshots
* Update e2e-tests/playwright/specs/functional/system_console/permissions/team_access.spec.ts
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
It was a mistake to return ANY error as NewErrNotFound. Because this
can be a DB timeout, or any other network error.
Returning NewErrNotFound would categorize it as 404, eventually printing
the error in the DEBUG level. Changing it to normal error fixes this.
https://mattermost.atlassian.net/browse/MM-63739
```release-note
NONE
```
This avoids a non-zero chance we append "pi" from the `model.NewId` and
end up with an invalid prefix "Api".
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62156: Avoid SELECT * in retention_policy_store.go
- Modified subQueryIN function to use specific column name instead of SELECT *
- Improved code comments to explain the change
- Maintained same functionality while avoiding SELECT *
Fixes: https://mattermost.atlassian.net/browse/MM-62156🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* simplify subQueryIN comments
* inline part of subQueryIN for greater clarity
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* fix: hanlde error from InvalidateAllCaches in slack.go
* change signature of InvalidateAllCaches to *model.AppError
* return err from InvalidateAllCaches everywhere
* Formatting
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* [MM-61463] Fix errcheck issues in post_helpers_test.go
- Added proper error handling for System.Save calls
- Removed post_helpers_test.go from errcheck ignore list in .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add back channels/app/plugin_test.go|
* Fix server/.golangci.yml
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Adds a mechanism to delete CPA values for a given user
This requires improving the Property Value service to enable delete
all values for a given target, so a new method was created that allows
to delete filtering by targetType and targetID (required) and
optionally for a specific groupID in case the caller wants to affect
all values for a target (useful in case you remove a post for example
and want to delete all values pointing to that post regardless of the
feature they belong to) or only those that belong to a specific
feature.
* Fix property value tests
* Fix after merge and update method name
* Fix linter
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adds direct participants to the channel invite
The channel invite now contains the sanitized users that are local to
the node that is sending the invite. In the event that the receiving
server doesn't have those users in its local database, it can create
them from the invite and correctly generate the DM or GM with them as
members.
* Use IsRemote instead of directly checking user attributes
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Move the sanitization and validation of CPA values to the model
* Fix CI
* Use proper IDs instead of strings
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
* implement cpa for ldap/saml for System Console
* i18n-extract
* update tests for changes
* revert package-lock.json
* fixes from review commnts
* import link
* fix bad merge
* more fixes
* update tests
* put behind a featureflag
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Fixes https://github.com/mattermost/mattermost/issues/29102
- Fix error handling in fileutils.FindDir() call by properly checking the returned boolean value
- Add proper error handling for SetPhase2PermissionsMigrationStatus calls
- Remove channels/app/support_packet_test.go from the errcheck exception list in .golangci.yml
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* Altered the forms, some little more work to go
* Adjusted the status rendering according to chosed options when email settings dialoge is closed
* addressed linting issues
* Update snapshots
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* move "e2e-tests/playwright/test" to "e2e-tests/playwright/test" and expose "ensurePluginsLoaded"
* add test setup, and expose ensurePluginsLoaded and ensureServerDeployment to pw
* allow opening angle bracket before links
* cut off link before an angle bracket(both open & close)
* add more test cases for ParseURLAutolink func
* add more test cases for ParseWWWAutolink func
* add more test cases for TrimTrailingCharactersFromLink func
* add more test cases for GetFirstLinkAndImages func
* add test cases for isAllowedBeforeWWWLink func
* allow closing angle bracket and opening paranthesis before links
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adde MySQL and Postgres migrations
* Replaced select * with column names
* removed all * from channel SQL store
* cleanup
* Fixed a duplicate column
* cleanup
* Added migrations and store support
* WIP
* used channelname slice in a missed place
* Handled patch
* Added app level tests
* Added API layer tests
* Added API layer tests
* WIP
* converted to query builder
* cleanupo
* added not null and default constraints
* Fixed test
* fixed file name
* review fixes
* review fixes
* updated migration file
* fixed text
* Review fixes
* WIP
* rendered banner
* WPI
* Fixed tooltip and markdown styling
* test: Add comprehensive tests for ChannelBanner component
* refactor: Use renderWithContext in channel_banner test
* WIP
* updated channel banner test
* Updated channel view test
* getContrastingSimpleColor tests
* Added tests
* rendered channel banner
* feat: Add comprehensive tests for ChannelBanner component
* Updated tests
* Made a lazy component
* Added underline to links in channel banner
* renamed param
* Created a selector for checking if channel banner is enabled or disabled
* addded test file
* test: Add tests for selectShowChannelBanner selector
* Added tests
* lint fix
* Used premium SKU constants
* Fixed a redux test
This PR adds functionality to search by a global search prefix.
This allows Mattermost to be used across multiple data centers
with multiple Elasticsearch instances synchronized using
cross-cluster replication.
While here, we also add tests cases to cover for some missing
search interface methods.
For now, no system console setting is exposed. Because IndexPrefix
is also not exposed. It can be added later if a need arises.
https://mattermost.atlassian.net/browse/MM-63298
```release-note
A new config setting ElasticsearchSettings.GlobalSearchPrefix is added
which can be used to search across multiple indices having a common prefix.
This is useful in a scenario with multiple Elasticsearch instances, where
multiple instances are writing to different indices with different prefixes
using the ElasticsearchSettings.IndexPrefix setting.
```
Co-authored-by: Mattermost Build <build@mattermost.com>
* Cursor first pass
* Iterating
* Updated snapshots
* Alert role only for error or warning
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63451 Rely on MUI's MenuList to handle focus when opening menus
* MM-63451 Add E2E tests for keyboard accessibility in the account menu
* Run prettier on E2E tests
* And check in the rest of those changes
* Fix lint
* fix for testing with server
* revert feature flag
* update profile popover for other property types
* lint fixes and test fixes
* src/components/user_settings/general/user_settings_general.tsx
* update from review
* lint fixes and type fixes
* review fixes
* fixes for property changes
* update properties
* fix tests
* fix tests
* update when_set and hidden
* update test for visiibility hidden
* add required fields to tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62710 Ensure CommentedOn message is never missing due to unloaded data
There's more information in the Jira ticket on how this occurs, but the
short version is that there's a way for either the root post and/or the
root post's author to be missing which previously caused the "Commented
On" line not to be rendered for a comment with CRT disabled. That caused
the post to appear as if it was part of the wrong thread.
Now, the CommentedOn component is always mounted when for the first
non-consecutive reply to a thread, and it knows how to load that missing
data itself.
I also took the opportunity to implement basic `useUser` and `usePost`
hooks which will fetch the user/post if needed. They're both implemented
using a shared `makeUseEntity` which should be usable for other entities
(objects stored in Redux state and fetched using a Redux action). These
also both use actions that use `DelayedDataLoader` to batch and debounce
requests for that data as well!
Assuming this works well, I'm hoping we can start using this pattern
elsewhere in the app.
* Update tests and remove unneeded mapStateToProps
* Address feedback
* Fix playwright tests
* revert Fix playwright tests
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
* MM-62157: Avoid SELECT * in user_store.go
- Replace raw SQL query "SELECT * FROM Users" with query builder in Update method
- Replace raw SQL query "SELECT * from Users" with query builder in ClearAllCustomRoleAssignments
- Change Select("*") to Select("data.*") in GetUserReport method
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62157: Avoid more instances of SELECT * in user_store.go
- Replace raw SQL query "Users.*, cm.ChannelId" with usersQuery in getUsersInGroupChannels
- Replace "Users.*" with getUsersColumns() in GetUserReport method
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add package.json for Playwright library with dependencies
* feat: Add explicit exports for test.config in playwright-lib package
* feat: Add initialization setup for Mattermost E2E testing with admin and user client
* fix: Update package dependencies and resolve TypeScript build errors
* feat: Update package exports for test.config to support both CommonJS and ESM
* playwright shared library
* add README, fix pipeline
* keep file structures, move report up to playwright
* minimize API, use the prerelease versions of client and types
* bump version
* update package*.json
* resolve merge conflict
* update depedencies and merge conflicts
* update readme and fix ci
* remove unnecessary export and list all external packages
* fix import for Client4
* Adds a groupID filter to the property service methods
This allows the property service caller to directly ensure that a
given call is only going to affect a field or value that belongs to a
given group, instead of (for example) retrieving a property value
before deleting it by id to ensure that the value belongs to a
specific property group. The groupID filter is optional and has no
effect if called with the empty string value.
The changes also remove references to input sanitization on trimming
the whitespace for the CPA field names and validate at the API level
the input for the field patch endpoint.
* Fix linter
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62162: Replace SELECT * in user_access_token_store.go
- Replaced all SELECT * queries with explicit column selection
- Used query builder instead of raw SQL strings for all queries
- Added reusable userAccessTokensSelectQuery in the store constructor
- Added comprehensive test for pagination and IsActive flag
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix code formatting in user_access_token_store test file
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62162: Update UserAccessToken Search method to use explicit column names
- Fixed "ambiguous column" errors by explicitly naming columns with table qualifiers
- Added test for the Search functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62162: Update UserAccessToken Search method to use explicit column names
- Fixed "ambiguous column" errors by explicitly naming columns with table qualifiers
- Maintained exact semantics of original query's LIKE filters
- Refactored to use query builder instead of raw SQL
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62162: Update UserAccessToken Search method to use reusable query
- Modified userAccessTokensSelectQuery to use fully qualified column names
- Updated Search method to use the existing query builder
- Fixed "ambiguous column" errors by using full column qualifiers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62162: Remove unnecessary comment in user_access_token_store.go
Removed redundant comment in Search method explaining the use of qualified column names, as the code is self-documenting.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62162: Use t.Cleanup() for token cleanup in userAccessTokenPagination test
* MM-62162: Handle error in Cleanup function
* linting
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62154: Avoid SELECT * in webhook_store.go
- Defined column list functions for both IncomingWebhooks and OutgoingWebhooks tables
- Converted all uses of SELECT * to use the column list functions
- Used the QueryBuilder pattern for SQL queries for better consistency and readability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62154: Improve webhook store implementation using query builders
- Refactored webhook store to follow session_store.go pattern
- Added select query builders in the constructor
- Used pre-built queries throughout the store implementation for better maintainability and performance
- Removed redundant incomingWebhookColumns() and outgoingWebhookColumns() functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62154: Fix whitespace style issues in webhook_store.go
- Ran gofmt to remove trailing whitespace
- Ensures consistent code formatting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62154: Remove unnecessary int(0) casting
- Simplified DeleteAt=0 condition by removing redundant int casting
- Maintains same behavior while making code cleaner
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62160: Avoid SELECT * in user_terms_of_service.go
- Added userTermsOfServiceSelectQuery in the constructor
- Replaced raw SQL query with query builder pattern
- Used explicit column selection instead of SELECT *
- Made the implementation more resilient to schema changes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* MM-62160: Also avoid SELECT * in terms_of_service_store.go
- Added termsOfServiceSelectQuery field to store struct
- Replaced SELECT * with explicit column selection
- Updated GetLatest and Get methods to use the query builder pattern
- Made the implementation more resilient to schema changes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
As part of https://github.com/mattermost/mattermost/pull/29932, we
stopped packaging Windows for releases. Let's go one step further and
stop building it too (saves build time!). And while we're in here, stop
doing this for OSX as well.
Both these targets remain buildable on demand, but we don't support
these platforms for production deployments.
* MM-62155: Avoid SELECT * in team_store.go
- Added explicit column lists for all SELECT queries
- Created teamSelectQuery for reused queries
- Replaced raw SQL queries with query builder pattern
* Refactor getTeamMembersWithSchemeSelectQuery to use teamMembersQuery builder
Instead of duplicating TeamMembers columns, use the existing builder to avoid redundancy.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove redundant comments from getTeamMembersWithSchemeSelectQuery
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Fixed dismiss icon color in the Jump to recents toast by changing the fill from button-bg-rgb to button-color-rgb
- Added hover state for dismiss icon to increase visibility when hovered
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* Add config settings for additional security features on mobile
* Add system console settings for mobile security
* Update svg and link
* Fix strings
* Add test for the discovery feature
* Fix tests
* Add permission migrations
* Add relevant e2e tests
* Fix key alignment
* fix tests
* Fix lint
* Mock new migration
* Fix playwright prettier
* Add new section to delegated permissions
* Update snapshots
* Fix flakyness in playwright test
---------
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: Add EnableCrossTeamSearch configuration option to ServiceSettings
* feat: Add EnableCrossTeamSearch configuration option to ServiceSettings
* feat: Enable cross-team search by default
* include old FF in client config
This commit introduces new functionality on the client side to send PING messages over the websocket. If the server doesn't respond within PING_INTERVAL (currently 30 seconds), the connection is closed and re-created. This will allow us to find broken connections more quickly.
We used < which meant we missed sending
reminders created for that timestamp, because
the job runs on that exact time.
Using <= to fix that.
https://mattermost.atlassian.net/browse/MM-63545
```release-note
NONE
```
* Fixing bot showing the local time
* feat: Add tests for bot and non-bot user time indicator behavior
* test: Update use_post_box_indicator tests with React rendering
* Fixing linter checks
* test: Add unit tests for custom profile attributes select options
* feat: Add custom profile attributes model with validation and constants
* refactor: Trim spaces from name and color in custom profile attribute select option constructor
* gofmt
* refactor: Fix typo in custom profile attributes select option function name
* feat: Add IsValid method to validate CustomProfileAttributesSelectOptions
* refactor: Replace map[string]bool with map[string]struct{} for key existence check
* refactor: Rename NewCustomProfileAttributeSelectOption to NewCustomProfileAttributesSelectOption
* feat: Add validation to prevent empty custom profile attribute options
* refactor: Add validation and creation methods for custom profile attributes
* feat: Add index number to validation error messages in custom profile attributes
* fix tests
* add default visibility
* feat: Add comprehensive test cases for custom profile attributes field validation
* fix: Update custom profile attributes map keys to use capitalized names
* feat: Add support for lowercase and title case keys in custom profile attributes map
* test: Add comprehensive test for NewCustomProfileAttributesSelectOptionFromMap
* feat: Add validation for custom profile attributes fields
* refactor: Update CustomProfileAttributesSelectOption constructor to prioritize ID parameter
* test: Add test cases for preserving IDs in custom profile attributes
* feat: Enhance ID validation and trimming in custom profile attributes
* don't do validation in constructor
* test: Add test case for preserving option IDs when patching select field
* improve test
* i18n
* refactor: Modify CustomProfileAttributesSelectOption to use lowercase JSON keys
* fix casing in custom profilte attributes test
* refactor: Use consistent "ValidateCPAField" in error messages for custom profile attributes
* use custom types rather than string
* lint
* fix api test
* refactor: Make color field optional in custom profile attributes
* style
* generic options
* removed unused i18n
* test: Add tests for NewCPAFieldFromPropertyField and CPAFieldToPropertyField
* test: Add test case for property field with empty attributes
* refactor: Cleanup whitespace and remove empty Attrs in custom profile attributes test
* test: Add test case for CPA field with empty attributes
* refactor: Improve custom profile attributes field handling and validation
* refactor: Move validateCustomProfileAttributesField to Validate method on CPAField struct
* use CPAField
* code style
* add validation and tests
* tests
* i18n
* err->appErr
* fix TestDeleteCPAField test
* i18n
* Add SAML and LDAP attr
* rename CustomProfileAttributes in method to CPA
* rename CPASortOrder method
* rearrange consts
* use Len test method
* sanitize and validate
* manage error the same way property field and value do
* fix: Update test error ID for custom profile attributes validation
* test: Update error ID expectations in custom profile attributes tests
* refactor: Convert CPAAttrs.SortOrder from string to int
* json uses float64
* feat: Add length validation for custom profile attribute option name and color
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
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>
If the deadQueue was full, we would be incorrectly sending
the wrong index for dqPtr. Fixed that and added a test case.
https://mattermost.atlassian.net/browse/MM-63304
```release-note
NONE
```
* [MA-13]: Updated the Theme list section in the settings modal
* [MA-13]: Fixed failing e2e test cases
* [MA-13]: Fixed accordion and removed aria-label from button
* [MA-13]: Fixed grouping of radio buttons
* [MA-13]: Updated the Theme list structure
* [MA-13]: Minor styling changes
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63205 Revert emoji store methods to return empty arrays instead of nil
* Update tests for getEmojiList
* Add case to TestGetEmojisByNames
* Update tests for searchEmoji and autocompleteEmoji
* [MM-62687] Patch permission check to avoid modifying the system admin
* Check for manage system first
* PR feedback
* Add another test
* Lint
* Fix test
* Bump Go version to 1.23.6
* Update CodeQL Github action as well
* Use server's Go version for CodeQL action
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
* Empty commit to trigger CI
* 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
---------
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-61647]: Upgraded react-select to v5
- Updated old type definitions with new v5 packaged type definitions.
- Removed some unused props
- Updated onBlur, onFocus and handleInputChange methods in user_input_email component
* Fix incorrect usage of handleInputChange in ChannelsInput
* Remove type assertions from dropdown_input_hybrid.tsx
* Simplify typing of users_emails_input.tsx
* [MM-61647][MM-61651]: Fixed some type definitions and e2e failing test case
* [MM-61647][MM-61651]: Fixed type error in dropdown_input_hybrid
* [MM-61647][MM-61651]: Fixed failing CI type error and e2e test cases
* [MM-61647][MM-61651]: Fixed failing e2e test case
* [MM-61647][MM-61651]: Updated the styles and reverted the test case changes
- Fixed the theme not getting correctly inherited
- Fixed the timezone and language settings getting saved on enter
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-61947 Run DND expiry job more often and round expiry time to match interval
* Move comment to make it godoc-compatible
* Change truncateDNDEndTime to work with seconds
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adde MySQL and Postgres migrations
* Replaced select * with column names
* removed all * from channel SQL store
* cleanup
* Fixed a duplicate column
* cleanup
* Added migrations and store support
* WIP
* used channelname slice in a missed place
* Handled patch
* Added app level tests
* Added API layer tests
* Added API layer tests
* WIP
* converted to query builder
* cleanupo
* added not null and default constraints
* Fixed test
* fixed file name
* review fixes
* review fixes
* updated migration file
* fixed text
* Review fixes
* implement websockets for CPA
* fix for testing with server
* revert feature flag
* fix unit test
* update constant names
* add reconnect handler
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adde MySQL and Postgres migrations
* Replaced select * with column names
* removed all * from channel SQL store
* cleanup
* Fixed a duplicate column
* cleanup
* used channelname slice in a missed place
* WIP
* converted to query builder
* cleanupo
* Review fixes
I had to fight with NPM longer than I thought I would for the override
to take effect. I ended up having to manually tweak the
package-lock.json to get it to take.
This commit adds some reconnection-specific unit tests to the WebSocketClient class, and fixes a few minor bugs:
- If `close()` is called during a reconnection delay, the socket won't close.
- If `send()` is called during a reconnection delay, we immediately try to reconnect (and don't respect any configured delays).
- If `initialize()` is called during a reconnection delay, we immediately try to reconnect (and don't respect any configured delays).
- If we receive two disconnection events, we'll attempt to reconnect with two new connections.
To allow for testing, I also needed to make the WebSocketClient more configurable. Specifically, the config allows for mocking the underlying websockets, and to control timeout delays.
* 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
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MA-7]: Refactored the post priority menu and fixed the keyboard navigation issue in the menu
* [MA-7]: Updated the menu list structure and fixed menu not closing bug
* [MA-7]: Review fixes minor code structure fixes
* [MA-7]: Fixed failing e2e test cases
* [MA-7]: Fixed styling and Keyboard behaviour of menu
* [MA-7]: Minor changes after rebased with master
* [MA-7]: Fixed failing playwright test case
* [MA-7]: Fixed failing e2e test cases
* [MA-7]: Fixed reverting of selected priority to previous value on menu close
* [MA-7]: Fixed failing smoke test
* [MA-7]: Fixed submenu pointer event and failing playwright test cases
* [MA-7]: Fixed failing playwright test case
* fix playwright tests
* fix playwright tests
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
* Set 'forwardRef' to 'true'
The Redux wrapper component not forwarding the ref to the parent resulted in the selected item ref being null.
* Add DM list test case
This test ensures the DM list scrolls items out of view into view when a user navigates using the Up and Down arrow keys.
* test(dm list): add zephyr test case number
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MA-17]: Added aria-activedescendant to the textbox
* [MA-17]: Fixed id and ARIA attribute
* Rebased with master branch
* [MA-17]: Removed irrelevant attribute
* [MA-17]: Updated the logic to add textbox id to At mention suggestion
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-60555] Use channel memberships to calculate total unread status instead of team memberships
* Fix lint
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
When Channel iteration mode is enabled, we need to ensure that
channel scoped events do not fall through to the connIndex.All()
condition. This is possible because there are multiple hubs
in a given system. So a single event will flow through all of them
and in some hubs, a channel scoped event might not have any connections.
In that case, we need to stop processing further.
https://mattermost.atlassian.net/browse/MM-62960
```release-note
NONE
```
* adding extra label to WIP-languages
* adding an extra space
* fix linting
* modifying test
* updating test
---------
Co-authored-by: Tom De Moor <tom.demoor@vclbgent.be>
* Fix forwardRef propTypes console error
The console error that was fixed by this is:
"Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"
* Fix function component ref console error
This fixes the following error:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React. forwardRef ()?
* Convert EmojiPickerOverlay to functional component
* Convert EmojiPickerTabs to functional component
* Extract AddReactionButton from ReactionList
This is so that I can make part of it functional without rewriting
the whole thing.
* Convert PostReaction to functional component
* Add general version of useEmojiPicker and use for AddReactionButton
* Rename returned showEmojiPicker to emojiPickerOpen
* Add test for AddReactionButton
* Move showEmojiPicker state out of useEmojiPicker
I hoped to avoid this by just having the hook return the
show state, but unfortunately, too many of the existing places
rely on controlling the state themselves
* Change PostReaction to use useEmojiPicker
I ran into some trouble with this getting the hover state to properly
disappear from the PostComponent when clicking out of the picker. That
seems to be a downside of the browser's mouseenter/mouseleave not
handling cases where the component is covered up. It doesn't work 100%,
but it works at least as well as master by disabling pointer-events to
the FloatingOverlay (which I also think we could probably remove since
it's supposed to just be for darkening the backdrop behind the picker,
but it ended up being helpful for setting the z-index on mobile).
* Change AdvancedTextEditor to use new useEmojiPicker
I renamed its version of useEmojiPicker to useEditorEmojiPicker since it
still contains information about how to position the emoji or gifs in
the post text.
* Convert EditPost to use useEmojiPicker
* Convert CreateModalNameInput to use useEmoijPicker
* Convert CustomStatusModal to use useEmojiPicker
* Remove EmojiPickerOverlay and cleanup related code
* Remove unneeded translation string
* asdf Attempting to fix E2E test
* Improve how useEmojiPicker positions itself to stay on screen more
* Add offset between Emoji Picker and reference
* Add horizontallyWithin middleware and use it to right-align the emoji picker in the post textbox
When we added iteration by channelID, this was a known tradeoff during that.
However, it has been observed that the regular connection removal function
creates considerable blocking of the processing loop, leading to high
CPU usage and API latencies.
To fix this, we add a reverse mapping of channelIDs to connections
and their positions in the slice. This helps us to remove the connection
from the slice without iteration.
Unfortunately, this still needs to iterate through all channelIDs
during invalidation of the channel member cache. However, the user
cache invalidation is not a regular activity. So it should be an acceptable
tradeoff to make.
https://mattermost.atlassian.net/browse/MM-62960
```release-note
A new config knob ServiceSettings.EnableWebHubChannelIteration which allows a user to control the performance of websocket broadcasting. By default, this setting is turned off. If it is turned on, it improves the websocket broadcasting performance at the expense of poor performance when users join/leave a channel. It is not recommended to turn it on unless you have atleast 200,000 concurrent users actively using MM.
```
Co-authored-by: Mattermost Build <build@mattermost.com>
We add a new config setting to allow the admin to set a fixed
list of userIDs to track for all client side webapp metrics.
This gives the admin to get a deeper look at how the application
is behaving for a single user.
A new section in the system console is also added for the user
to edit this setting from the UI.
https://mattermost.atlassian.net/browse/MM-61888
```release-note
A new config setting MetricsSettings.ClientSideUserIds is added
where you can set the user ids you want to track for client side webapp
metrics.
```
* fix lint errors
```release-note
NONE
```
* fixing tests
```release-note
NONE
```
* refactor: Replace pagination with cursor-based pagination for custom profile attributes
* remove pagination loop on property value retrieval for CPA
* add migrations to optimize pagination on property fields and values
* adapt test to remove pagination check
* update migrations list
* postgres: drop index concurrently
* concurrent index manipulation must be done outside of a Tx
* fix: Correct SQL index drop syntax from "OM" to "ON" in migration files
* test: Add CountForGroup test cases for property field store
* refactor: Add CountForGroup method to PropertyFieldStore interface and implementations
* Fix style and i18n
* feat: Add optional deleted property field filtering to CountForGroup method
* refactor: Update CountForGroup to support optional deleted property fields
* test: Add comprehensive tests for CountForGroup with includeDeleted parameter
* adapt test + gen layers
* rename property service method and set the includeDelete to false
* refactor: Remove redundant constant and use CustomProfileAttributesFieldLimit directly
* fix tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Adds websocket messages to Custom Profile Attributes
The app layer now fires a websocket event as part of the operations
over Custom Profile Attribute fields and values. It updates as well
the Patch method for CPA values so all the changes are commited as
part of the same transaction.
To be able to do this last operation, the change adds methods to
upsert CPA values in both the store and the property service.
* Fix i18n strings
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* Remove uneeded hack in docker-compose now that problem is solved
* Remove obsolete attribute `version` in docker compose configuration files
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: Add initial store configuration for webapp channels
* refactor: Convert store/index.js to TypeScript with type definitions
* test: Add initial test file for store index
* refactor: Convert index.test.js to TypeScript with type annotations
* Removing old files
* Applying linter fixes
* Fixing some of the types errors
* fix: Type mock implementation of getState in global_actions.test.ts
* test: Add missing GlobalState import in global_actions.test.ts
* fix: Resolve TypeScript mock implementation error in global_actions.test.ts
* Some fixes
* Address CI problems
* Installing zen-observable types
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Simpliying things
* Fixing CI
* Fixing types
2025-02-10 15:43:09 +01:00
3198 изменённых файлов: 250919 добавлений и 81389 удалений
description:Create a report about an issue you found
title:"[Bug]: "
labels:"Bug Report/Open"
body:
- type:checkboxes
attributes:
label:Before you file a bug report
description:Please ensure you can confirm the following
options:
- label:I have checked the [issue tracker](https://github.com/mattermost/mattermost/issues) and have not found an issue that matches the one I'm filing.
required:true
- label:"This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16."
required:true
- label:"This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.uservoice.com/forums/306457-general/."
required:true
- label:This issue reproduces on one of the [currently supported server versions](https://docs.mattermost.com/about/mattermost-server-releases.html#latest-releases).
required:true
- label:I have read the [contribution guidelines](https://github.com/mattermost/mattermost/blob/master/CONTRIBUTING.md) and the [Mattermost Handbook Contribution Guidelines](https://handbook.mattermost.com/contributors/contributors/guidelines/contribution-guidelines).
required:true
- type:input
attributes:
label:Mattermost Server Version
description:|
What version of the Mattermost server are you using? You can find it by going to [Main Menu] > [About Mattermost].
validations:
required:true
- type:input
attributes:
label:Operating System
description:|
What operating system does this issue occur on?
Example: Windows 10
validations:
required:true
- type:textarea
attributes:
label:Steps to reproduce
description:|
Include a clear description of the steps taken to reproduce this issue.
It is also helpful to attach a screenshot or video if applicable.
validations:
required:true
- type:textarea
attributes:
label:Expected behavior
description:Include a clear description of what you expect to happen.
validations:
required:true
- type:textarea
attributes:
label:Observed behavior
description:Include a clear description of what actually happens.
validations:
required:true
- type:textarea
attributes:
label:Log Output
description:Please include output from the log files.
render:shell
- type:textarea
attributes:
label:Additional Information
description:If you have anything else to add to the ticket, you may do so here.
_COMMIT_SHA_COMPUTED=$(git rev-parse --verify "$REF") # NB: not actually used for resolving the commit; it's only to double check the value of 'inputs.ref'
### For image tag generation: utilize 'inputs.ref', assume that it is a full commit SHA
COMMIT_SHA="${REF}"
BRANCH="server-pr-${PR_NUMBER}" # For reference, the real branch name may be retrievable with command: 'jq -r .head.ref <pr.json'
SERVER_IMAGE_TAG="${COMMIT_SHA::7}"
SERVER_IMAGE_ORG=mattermostdevelopment
BUILD_ID_SUFFIX="${REPORT_TYPE@L}-${SERVER}-ent"
WORKERS_NUMBER=20
TEST_FILTER_CYPRESS="$TEST_FILTER_CYPRESS_PR"
COMPUTED_REPORT_TYPE="${REPORT_TYPE}"
### Run sanity assertions after variable generations
[ "$REF" = "${_COMMIT_SHA_COMPUTED}" ] # 'inputs.ref' must be a full commit hash, and the commit must exist
[ "$REPORT_TYPE" != "PR" ] || [ "$PR_NUMBER" -gt "0" ] # If report type is PR, then PR_NUMBER must be set to a number
_IS_TEST_UNSTABLE=$(sed -n -E 's/^.*(UNSTABLE).*$/\1/p' <<< "$REPORT_TYPE") # The variable's value is 'UNSTABLE' if report type is for unstable tests, otherwise it's empty
### For ref and image tag generation: ignore 'inputs.ref', and use master branch directly. Note that 'COMMIT_SHA' will be used for reporting the test result, and for checking out the testing scripts and test cases
ROLLING_RELEASE_SERVER_IMAGE_TAG=$(echo "$ROLLING_RELEASE_FROM_TAG" | sed 's/^v//') # Remove the leading 'v' from the given tag name, to generate the docker image tag
E2E test run is starting for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}${MM_SERVICE_OVERRIDES:+, Cypress service overrides \`$MM_SERVICE_OVERRIDES\`}.
To check the run progress:
- Cypress: ${RUN_CYPRESS:+look for commit status \`$STATUS_CHECK_CONTEXT\` or the access the [Automation Dashboard Cycle URL]($CYCLE_URL)}$([ -n "${RUN_CYPRESS:-}" ] || echo -n "will not run").
- Playwright: ${RUN_PLAYWRIGHT:+look for commit status \`$STATUS_CHECK_CONTEXT-playwright\`}$([ -n "${RUN_PLAYWRIGHT:-}" ] || echo -n "will not run").
You can also look at the [E2E test's Workflow Run URL]($WORKFLOW_RUN_URL) (run ID \`${{ github.run_id }}\`).
* Ideally, this would have been caught in a pull request, but now a volunteer is required. If you're willing to help, submit a separate pull request to skip the flaky tests (e.g. [23360](https://github.com/mattermost/mattermost/pull/23360)) and file JIRA ticket (e.g. [MM-52743](https://mattermost.atlassian.net/browse/MM-52743)) for later investigation.
* Finally, reply to this message with a link to the created JIRA ticket.
Thank you for your interest in contributing! Please see the [Mattermost Contribution Guide](https://developers.mattermost.com/contribute/getting-started/) which describes the process for making code contributions across Mattermost projects and [join our "Contributors" community channel](https://community.mattermost.com/core/channels/tickets) to ask questions from community members and the Mattermost core team.
In addition, we recommend reviewing the [Contribution Guidelines](https://handbook.mattermost.com/contributors/contributors/guidelines/contribution-guidelines) in the Mattermost Handbook, which provide comprehensive best practices and expectations for contributors.
When you submit a pull request, it goes through a [code review process outlined here](https://developers.mattermost.com/contribute/getting-started/code-review/).
As you will need to cherry-pick some commits (the main fork commit and a fix-patch commit), you will need to go on an old release branch.
```bash
exportOLD_VERSION=10.5.0
```
```bash
exportBASE_VERSION=$(echo"$NEW_VERSION"| sed -e "s/\.[^.]\+$//")
git checkout "release-$OLD_VERSION"
git log --graph --abbrev-commit --date=relative \
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset'\
--max-count=3
```
Note the commits you’ll need (usually, the two first commits).
Go to the main branch of the version you want and reset the code to this version, then create a new branch with the version you want to compile from the main branch of this version.
@@ -2971,6 +2971,64 @@ AWS SDK for the Go programming language.
limitations under the License.
---
## axios
This product contains 'axios' by Matt Zabriskie.
Promise based HTTP client for the browser and node.js
* HOMEPAGE:
* https://axios-http.com
* LICENSE: MIT
# Copyright (c) 2014-present Matt Zabriskie & Collaborators
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
## bep/imagemeta
This product contains 'bep/imagemeta' by Bjørn Erik Pedersen.
Go library for reading EXIF, IPTC and XMP image meta data from JPEG, TIFF, PNG, and WebP files.
* HOMEPAGE:
* https://github.com/bep/imagemeta
* LICENSE: MIT License
MIT License
Copyright (c) 2022 Bjørn Erik Pedersen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
## blang/semver
@@ -3379,41 +3437,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
## code.sajari.com/docconv
This product contains 'code.sajari.com/docconv' by Search.io.
Converts PDF, DOC, DOCX, XML, HTML, RTF, etc to plain text
* HOMEPAGE:
* https://github.com/sajari/docconv
* LICENSE: MIT License
The MIT License (MIT)
Copyright (c) 2014 Sajari Pty Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---
## color-contrast-checker
@@ -3926,16 +3949,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
## dynamic-virtualized-list
This product contains 'dynamic-virtualized-list'.
security holding package
---
## elastic/go-elasticsearch
@@ -9054,14 +9067,14 @@ SOFTWARE.
---
## mholt/archiver
## mholt/archives
This product contains 'mholt/archiver' by Matt Holt.
This product contains 'mholt/archives' by Matt Holt.
Easily create & extract archives, and compress & decompress files of various formats
Cross-platform library to create & extract archives, compress & decompress files, and walk virtual file systems across various formats
* HOMEPAGE:
* https://pkg.go.dev/github.com/mholt/archiver/v4
* https://pkg.go.dev/github.com/mholt/archives
* LICENSE: MIT License
@@ -9390,27 +9403,27 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
## oov/psd
## monaco-editor
This product contains 'psd' by oov.
This product contains 'monaco-editor'.
A PSD/PSB file reader for go
A browser based code editor
* HOMEPAGE:
* https://github.com/oov/psd
* https://github.com/microsoft/monaco-editor
* LICENSE: MIT
MIT License
The MIT License (MIT)
Copyright (c) 2016 oov
Copyright (c) 2016 - present Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
 Mostlymatter is a fork of [Mattermost](https://mattermost.com) meant to remove the users and messages limits.
[Mattermost](https://mattermost.com) is an open source platform for secure collaboration across the entire software development lifecycle. This repo is the primary source for core development on the Mattermost platform; it's written in Go and React and runs as a single Linux binary with MySQL or PostgreSQL. A new compiled version is released under an MIT license every month on the 16th.
[Mattermost](https://mattermost.com) is an open core, self-hosted collaboration platform that offers chat, workflow automation, voice calling, screen sharing, and AI integration. This repo is the primary source for core development on the Mattermost platform; it's written in Go and React, runs as a single Linux binary, and relies on PostgreSQL. A new compiled version is released under an MIT license every month on the 16th.
[Deploy Mattermost on-premises](https://mattermost.com/deploy/?utm_source=github-mattermost-server-readme), or [try it for free in the cloud](https://mattermost.com/sign-up/?utm_source=github-mattermost-server-readme).
Please go to <https://github.com/mattermost/mattermost/> for installation instructions.
<img width="1006" alt="mattermost user interface" src="https://user-images.githubusercontent.com/7205829/136107976-7a894c9e-290a-490d-8501-e5fdbfc3785a.png">
## Differences between Mostlymatter and Mattermost
Learn more about the following use cases with Mattermost:
Our fork is limited to the backend (the binary), we don’t modify the front-end and we don’t provide compiled version of the other tools of Mattermost (like `mmctl`).
- [IT Service Desk](https://mattermost.com/solutions/use-cases/it-service-desk/?utm_source=github-mattermost-server-readme)
We multiplied the limits in `server/channels/app/limits.go` by 1,000.
Other useful resources:
The user limits should be 5,000,000 and 11,000,000.
- [Download and Install Mattermost](https://docs.mattermost.com/guides/deployment.html) - Install, setup, and configure your own Mattermost instance.
- [Product documentation](https://docs.mattermost.com/) - Learn how to run a Mattermost instance and take advantage of all the features.
- [Developer documentation](https://developers.mattermost.com/) - Contribute code to Mattermost or build an integration via APIs, Webhooks, slash commands, Apps, and plugins.
We replaced the name `Mattermost` by `Mostlymatter` (and `mattermost` by `mostlymatter`) in the server strings (logging, help pages…) to avoid confusion between our the official build and our own but we kept the copyright comments.
Table of contents
=================
The modifications are contained in the file [`limitless.patch`](limitless.patch).
- [Install Mattermost](#install-mattermost)
- [Native mobile and desktop apps](#native-mobile-and-desktop-apps)
To apply our modifications and compile Mostlymatter, please have a look at [MOSTLYMATTER_HOW_TO.md](MOSTLYMATTER_HOW_TO.md).
## Install Mattermost
## Get Mostlymatter binaries
- [Download and Install Mattermost Self-Hosted](https://docs.mattermost.com/guides/deployment.html) - Deploy a Mattermost Self-hosted instance in minutes via Docker, Ubuntu, or tar.
- [Get started in the cloud](https://mattermost.com/sign-up/?utm_source=github-mattermost-server-readme) to try Mattermost today.
- [Developer machine setup](https://developers.mattermost.com/contribute/server/developer-setup) - Follow this guide if you want to write code for Mattermost.
Go to <https://packages.framasoft.org/projects/mostlymatter/> to get the binaries you want.
Other install guides:
- [Deploy Mattermost on Docker](https://docs.mattermost.com/install/install-docker.html)
- [More server install guides](https://docs.mattermost.com/guides/deployment.html)
## Native mobile and desktop apps
In addition to the web interface, you can also download Mattermost clients for [Android](https://mattermost.com/pl/android-app/), [iOS](https://mattermost.com/pl/ios-app/), [Windows PC](https://docs.mattermost.com/install/desktop-app-install.html#windows-10-windows-8-1), [macOS](https://docs.mattermost.com/install/desktop-app-install.html#macos-10-9), and [Linux](https://docs.mattermost.com/install/desktop-app-install.html#linux).
[<img src="https://user-images.githubusercontent.com/30978331/272826427-6200c98f-7319-42c3-86d4-0b33ae99e01a.png" alt="Get Mattermost on Google Play" height="50px"/>](https://mattermost.com/pl/android-app/) [<img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Get Mattermost on the App Store" height="50px"/>](https://itunes.apple.com/us/app/mattermost/id1257222717?mt=8) [](https://docs.mattermost.com/install/desktop.html#windows-10-windows-8-1-windows-7) [](https://docs.mattermost.com/install/desktop.html#macos-10-9) [](https://docs.mattermost.com/install/desktop.html#linux)
## Get security bulletins
Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you're deploying Mattermost it's highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.
- [Join Developer Discussion on a Mattermost server for contributors](https://community.mattermost.com/signup_user_complete/?id=f1924a8db44ff3bb41c96424cdc20676)
- [Get Help With Mattermost](https://docs.mattermost.com/guides/get-help.html)
## Learn more
- [API options - webhooks, slash commands, drivers, and web service](https://api.mattermost.com/)
- [See who's using Mattermost](https://mattermost.com/customers/)
- [Browse over 700 Mattermost integrations](https://mattermost.com/marketplace/)
Follow the instructions on top of the page to verify the binaries you downloaded.
## License
See the [LICENSE file](LICENSE.txt) for license rights and limitations.
## Get the latest news
## License of Mostlymatter’s logo
- **X** - Follow [Mattermost on X, formerly Twitter](https://twitter.com/mattermost).
- **Blog** - Get the latest updates from the [Mattermost blog](https://mattermost.com/blog/).
- **Facebook** - Follow [Mattermost on Facebook](https://www.facebook.com/MattermostHQ).
- **LinkedIn** - Follow [Mattermost on LinkedIn](https://www.linkedin.com/company/mattermost/).
- **Email** - Subscribe to our [newsletter](https://mattermost.us11.list-manage.com/subscribe?u=6cdba22349ae374e188e7ab8e&id=2add1c8034) (1 or 2 per month).
- **Mattermost** - Join the ~contributors channel on [the Mattermost Community Server](https://community.mattermost.com).
- **IRC** - Join the #matterbridge channel on [Freenode](https://freenode.net/) (thanks to [matterircd](https://github.com/42wim/matterircd)).
- **YouTube** - Subscribe to [Mattermost](https://www.youtube.com/@MattermostHQ).
[Join the Mattermost Contributors server](https://community.mattermost.com/signup_user_complete/?id=codoy5s743rq5mk18i7u5ksz7e) to join community discussions about contributions, development, and more.
This repository holds the API reference available at [https://api.mattermost.com](https://api.mattermost.com).
This repository holds the API reference documentation for Mattermost available at [https://developers.mattermost.com/api-reference](https://developers.mattermost.com/api-reference).
The Mattermost API reference uses the [OpenAPI standard](https://openapis.org/) and the [ReDoc document generator](https://github.com/Rebilly/ReDoc).
@@ -25,4 +25,4 @@ To test locally, run `make build`, `make run` and navigate to `http://127.0.0.1:
## Deployment
Deployment is handled automatically by our Jenkins CLI machine. When a pull request is merged it will automatically be deployed to [https://api.mattermost.com](https://api.mattermost.com).
Deployment is handled automatically by our Github Actions. When a pull request is merged, it will automatically be deployed to [https://developers.mattermost.com/api-reference](https://developers.mattermost.com/api-reference).
The Mattermost Web Services API is used by Mattermost clients and third
party applications to interact with the server. [JavaScript and Golang
drivers for](/#tag/drivers) connecting to the APIs are also available.
The Mattermost Web Services API enables Mattermost clients and third-party applications
to interact with Mattermost servers.
### Support
[Official JavaScript and Golang drivers](#/#official-drivers)
are available to simplify API integration.
Mattermost core committers work with the community to keep the API documentation up-to-date.
By using this API, you agree to our [terms of service](https://about.mattermost.com/default-terms/).
If you have questions on API routes not listed in this reference, please [join the Mattermost community server](https://community.mattermost.com) to ask questions in the Developers channel, [or post questions to our Developer Discussion forum](https://forum.mattermost.org/c/dev).
[Find out more about Mattermost](https://about.mattermost.com/)
[Bug reports](https://github.com/mattermost/mattermost/issues) in the documentation or the API are also welcome, as are pull requests to fix the issues.
## Schema & Conventions
- All API access is through HTTP(S) requests at `your-mattermost-url/api/v4`.
### Contributing
- All request and response bodies are `application/json`.
- When using endpoints that require a user id, the string `me` can be used in place
of the user id to indicate the action is to be taken for the logged in user.
When you have answers to API questions not addressed in our documentation we ask you to consider making a pull request to improve our reference. Small and large changes are all welcome.
- For all endpoints that implement pagination via the `per_page` parameter:
- Maximum items per page: 200 (requests exceeding this will be silently truncated)
We also have [Help Wanted tickets](https://github.com/mattermost/mattermost/issues?q=is%3Aopen+is%3Aissue+label%3AArea%2FAPI) available for community members who would like to help others more easily use the APIs. We acknowledge everyone's contribution in the [release notes of our next version](https://docs.mattermost.com/administration/changelog.html#contributors).
- Default value if a paged API requires a `per_page` parameter and it is not provided: 60
## Authentication
The source code for this API reference is hosted at https://github.com/mattermost/mattermost/tree/master/api.
- name:schema
description:>
All API access is through HTTP(S) requests at
`your-mattermost-url.com/api/v4`. All request and response bodies are
`application/json`.
When using endpoints that require a user id, the string `me` can be used in place of the user id to indicate the action is to be taken for the logged in user.
For all endpoints that implement pagination via the `per_page` parameter, the maximum number of items returned per request is capped at 200. If `per_page` exceeds 200, the list will be silently truncated to 200 items.
- name:drivers
description:>
The easiest way to interact with the Mattermost Web Service API is through
For community-built drivers and API wrappers, see [our app directory](https://mattermost.com/marketplace/).
- name:authentication
description:>
There are multiple ways to authenticate against the Mattermost API.
All examples assume there is a Mattermost instance running at http://localhost:8065.
### Session Token
#### Session Token
Make an HTTP POST to `your-mattermost-url.com/api/v4/users/login` with a JSON body indicating the user’s `login_id`, `password` and optionally the MFA `token`. The `login_id` can be an email, username or an AD/LDAP ID depending on the system's configuration.
```
Make an HTTP POST to `your-mattermost-url/api/v4/users/login` with a JSON
body indicating the user's `login_id`, `password` and optionally the MFA
`token`. The `login_id` can be an email, username or an AD/LDAP ID
NOTE: If you're running cURL on windows, you will have to change the single quotes to double quotes, and escape the inner double quotes with backslash, like below:
You should now be able to access the API as the user you logged in as.
#### Personal Access Tokens
Using [personal access tokens](https://docs.mattermost.com/developer/personal-access-tokens.html) is very similar to using a session token. The only real difference is that session tokens will expire, while personal access tokens will live until they are manually revoked by the user or an admin.
### Personal Access Tokens
Using [personal access tokens](https://developers.mattermost.com/integrate/reference/personal-access-token/) is very similar to using a session token. The only real difference is that session tokens will expire, while personal access tokens will live until they are manually revoked by the user or an admin.
Just like session tokens, include the personal access token as part of the `Authorization` header in your requests using the `Bearer` method. Assuming our personal access token is `9xuqwrwgstrb3mzrxb83nb357a`, we could use it as shown below.
| X-Ratelimit-Limit | The maximum number of requests you can make per second. |
| X-Ratelimit-Remaining | The number of requests remaining in the current window. |
| X-Ratelimit-Reset | The remaining UTC epoch seconds before the rate limit resets. |
If you exceed your rate limit for a window you will receive the following error in the body of the response:
The official documentation for [using your Mattermost server as an OAuth 2.0 service provider can be found here.](https://docs.mattermost.com/developer/oauth-2-0-applications.html)
```http
HTTP/1.1 429 Too Many Requests
Date: Tue, 10 Sep 2015 11:20:28 GMT
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1
limit exceeded
```
## Error Handling
For an example on how to register an OAuth 2.0 app with your Mattermost instance, please see the [Mattermost-Zapier integration documentation](https://docs.mattermost.com/integrations/zapier.html#register-zapier-as-an-oauth-2-0-application).
- name:errors
description:>
All errors will return an appropriate HTTP response code along with the
following JSON body:
```
```json
{
"id": "the.error.id",
"message": "Something went wrong", // the reason for the error
@@ -188,75 +177,21 @@ tags:
}
```
- name:rate limiting
description:>
Whenever you make an HTTP request to the Mattermost API you might notice
the following headers included in the response:
```
## WebSocket
In addition to the HTTP RESTful web service, Mattermost also offers a WebSocket event delivery system and some API functionality.
X-Ratelimit-Limit: 10
X-Ratelimit-Remaining: 9
X-Ratelimit-Reset: 1441983590
```
To connect to the WebSocket follow the standard opening handshake as [defined by the RFC specification](https://tools.ietf.org/html/rfc6455#section-1.3) to the `/api/v4/websocket` endpoint of Mattermost.
These headers are telling you your current rate limit status.
| Header | Description |
| ------ | ----------- |
| X-Ratelimit-Limit | The maximum number of requests you can make per second. |
| X-Ratelimit-Remaining | The number of requests remaining in the current window. |
| X-Ratelimit-Reset | The remaining UTC epoch seconds before the rate limit resets. |
If you exceed your rate limit for a window you will receive the following error in the body of the response:
```
HTTP/1.1 429 Too Many Requests
Date: Tue, 10 Sep 2015 11:20:28 GMT
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1
limit exceeded
```
- name:WebSocket
description:>
In addition to the HTTP RESTful web service, Mattermost also offers a
WebSocket event delivery system and some API functionality.
To connect to the WebSocket follow the standard opening handshake as [defined by the RFC specification](https://tools.ietf.org/html/rfc6455#section-1.3) to the `/api/v4/websocket` endpoint of Mattermost.
#### Authentication
The Mattermost WebSocket can be authenticated using [the standard API authentication methods](/#tag/authentication) (by a cookie or with an explicit Authorization header) or through an authentication challenge. If you're authenticating from a browser and have logged in with the Mattermost API, your authentication cookie should already be set. This is how the Mattermost webapp authenticates with the WebSocket.
### Authentication
The Mattermost WebSocket can be authenticated using [the standard API authentication methods](/#/#authentication) (by a cookie or with an explicit Authorization header) or through an authentication challenge. If you're authenticating from a browser and have logged in with the Mattermost API, your authentication cookie should already be set. This is how the Mattermost webapp authenticates with the WebSocket.
To authenticate with an authentication challenge, first connect the WebSocket and then send the following JSON over the connection:
```
```json
{
"seq": 1,
"action": "authentication_challenge",
@@ -264,37 +199,27 @@ tags:
"token": "mattermosttokengoeshere"
}
}
```
If successful, you will receive a standard OK response over the WebSocket connection:
```
```json
{
"status": "OK",
"seq_reply": 1
}
```
Once successfully authenticated, the server will pass a `hello` WebSocket event containing server version over the connection.
#### Events
### Websocket Events
WebSocket events are primarily used to alert the client to changes in Mattermost, such as delivering new posts or alerting the client that another user is typing in a channel.
Events on the WebSocket will have the form:
```
```json
{
"event": "hello",
"data": {
@@ -308,112 +233,62 @@ tags:
},
"seq": 0
}
```
The `event` field indicates the event type, `data` contains any data relevant to the event and `broadcast` contains information about who the event was sent to. For example, the above example has `user_id` set to "ay5sq51sebfh58ktrce5ijtcwy" meaning that only the user with that ID received this event broadcast. The `omit_users` field can contain an array of user IDs that were specifically omitted from receiving the event.
The list of Mattermost WebSocket events are:
- added_to_team
- authentication_challenge
- channel_converted
- channel_created
- channel_deleted
- channel_member_updated
- channel_updated
- channel_viewed
- config_changed
- delete_team
- direct_added
- emoji_added
- ephemeral_message
- group_added
- hello
- leave_team
- license_changed
- memberrole_updated
- new_user
- plugin_disabled
- plugin_enabled
- plugin_statuses_changed
- post_deleted
- post_edited
- post_unread
- posted
- preference_changed
- preferences_changed
- preferences_deleted
- reaction_added
- reaction_removed
- response
- role_updated
- status_change
- typing
- update_team
- user_added
- user_removed
- user_role_updated
- user_updated
- dialog_opened
- thread_updated
- thread_follow_changed
- thread_read_changed
#### WebSocket API
### Websocket API
Mattermost has some basic support for WebSocket APIs. A connected WebSocket can make requests by sending the following over the connection:
```
```json
{
"action": "user_typing",
"seq": 2,
@@ -422,37 +297,28 @@ tags:
"parent_id": ""
}
}
```
This is an example of making a `user_typing` request, with the purpose of alerting the server that the connected client has begun typing in a channel or thread. The `action` field indicates what is being requested, and performs a similar duty as the route in a HTTP API. The `data` field is used to add any additional data along with the request. The server supports binary websocket messages as well in case the client has such a requirement.
The `seq` or sequence number is set by the client and should be incremented with every use. It is used to distinguish responses to requests that come down the WebSocket. For example, a standard response to the above request would be:
```
```json
{
"status": "OK",
"seq_reply": 2
}
```
Notice `seq_reply` is 2, matching the `seq` of the original request. Using this a client can distinguish which request the response is meant for.
If there was any information to respond with, it would be encapsulated in a `data` field.
In the case of an error, the response would be:
```
```json
{
"status": "FAIL",
"seq_reply": 2,
@@ -461,32 +327,65 @@ tags:
"message": "Some error message here"
}
}
```
The list of WebSocket API actions is:
- user_typing
- get_statuses
- get_statuses_by_ids
To see how these actions work, please refer to either the [Golang WebSocket driver](https://github.com/mattermost/mattermost/blob/master/server/public/model/websocket_client.go) or our [JavaScript WebSocket driver](https://github.com/mattermost/mattermost/blob/master/webapp/platform/client/src/websocket.ts).
- name:common parameters
description:>
- `per_page`: For paged APIs, the number of items to return per page.
The maximum number of items returned per request is capped at 200. If `per_page` exceeds 200, the list will be silently truncated to 200 items.
## Drivers
The easiest way to interact with the Mattermost Web Service API is through
a language specific driver.
If a paged API requires a `per_page` parameter and it is not provided, the default value is 60.
For community-built drivers and API wrappers, see [our app directory](https://mattermost.com/marketplace-category/mattermost-developers-tools/).
## Support
Mattermost core committers work with the community to keep the API documentation up-to-date.
If you have questions on API routes not listed in this reference, you can:
- [Join the Mattermost community server](https://community.mattermost.com) to ask questions in the Developers channel
- Contact us at feedback@mattermost.com
[Bug reports](https://github.com/mattermost/mattermost/issues) in the documentation or the API are also welcome, as are pull requests to fix the issues.
## Contributing
When you have answers to API questions not addressed in our documentation we ask you to consider making a pull request to improve our reference. Small and large changes are all welcome.
We also have [Help Wanted tickets](https://github.com/mattermost/mattermost/issues?q=is%3Aopen+is%3Aissue+label%3AArea%2FAPI) available for community members who would like to help others more easily use the APIs. We acknowledge everyone's contribution in the [release notes of our next version](https://docs.mattermost.com/administration/changelog.html#contributors).
The source code for this API reference is hosted at https://github.com/mattermost/mattermost/tree/master/api.
version:4.0.0
title:Mattermost API
tags:
- name:users
description:>
Endpoints for creating, getting and interacting with users.
When using endpoints that require a user id, the string `me` can be used in place of the user id to indicate the action is to be taken for the logged in user.
- name:bots
description:Endpoints for creating, getting and updating bot users.
@@ -561,64 +460,11 @@ tags:
description:Endpoints related to export files.
- name:metrics
description:Endpoints related to metrics, including the Client Performance Monitoring feature.
x-tagGroups:
- name:Overview
tags:
- introduction
- schema
- name:Standard Features
tags:
- drivers
- authentication
- errors
- rate limiting
- WebSocket
- common parameters
- name:Endpoints
tags:
- users
- bots
- teams
- channels
- posts
- threads
- files
- uploads
- bookmarks
- preferences
- status
- emoji
- reactions
- webhooks
- commands
- system
- brand
- OAuth
- SAML
- LDAP
- groups
- compliance
- cluster
- cloud
- elasticsearch
- bleve
- data retention
- jobs
- plugins
- roles
- schemes
- integration_actions
- remote clusters
- shared channels
- terms of service
- imports
- permissions
- exports
- usage
- reports
- custom profile attributes
- metrics
- name:audit_logs
description:Endpoints for managing audit log certificates and configuration.
${MME2E_DC_SERVER}exec -T -- server mmctl --local config set$(tr '='' '<<<$SETTING)
@@ -23,24 +22,30 @@ fi
if["$TEST"="cypress"];then
mme2e_log "Prepare Cypress: install dependencies"
${MME2E_DC_SERVER}exec -T -u 0 -- cypress bash -c "id $MME2E_UID || useradd -u $MME2E_UID -m nodeci"# Works around the node image's assumption that the app files are owned by user 1000
# Create user in Cypress container and work around the node image's assumption that the app files are owned by user 1000
for MIGRATION in migration_advanced_permissions_phase_2;do
# Query explanation: if it doesn't find the migration in the table, there are 0 results and the command fails with a divide-by-zero error. Otherwise the command succeeds
MIGRATION_CHECK_COMMAND="${MME2E_DC_SERVER} exec -T -- postgres psql -U mmuser mattermost_test -c \"select 1 / (select count(*) from Systems where name = '${MIGRATION}' and value = 'true');\""
if ! mme2e_wait_command_success "$MIGRATION_CHECK_COMMAND >/dev/null 2>&1""Waiting for migration to be completed: ${MIGRATION}""30""10";then
MIGRATION_CHECK_COMMAND="${MME2E_DC_SERVER} exec -T postgres sh -c 'PGPASSWORD=mostest psql -U mmuser mattermost_test -c \"select 1 / (select count(*) from Systems where name = '\''${MIGRATION}'\'' and value = '\''true'\'');\"'"
if ! mme2e_wait_command_success "$MIGRATION_CHECK_COMMAND""Waiting for migration to be completed: ${MIGRATION}""10""10";then
"description":"Customize this playbook's description to give an overview of when and how this playbook is run.",
"message_on_join":"Welcome! This channel was automatically created as part of a playbook run.",
"metrics":[],
"reminder_timer_default_seconds":604800,
"retrospective_enabled":true,
"retrospective_template":"### Summary\nThis should contain 2-3 sentences that give a reader an overview of what happened, what was the cause, and what was done. The briefer the better as this is what future teams will look at first for reference.\n\n### What was the impact?\nThis section describes the impact of this playbook run as experienced by internal and external customers as well as stakeholders.\n\n### What were the contributing factors?\nThis playbook may be a reactive protocol to a situation that is otherwise undesirable. If that's the case, this section explains the reasons that caused the situation in the first place. There may be multiple root causes - this helps stakeholders understand why.\n\n### What was done?\nThis section tells the story of how the team collaborated throughout the event to achieve the outcome. This will help future teams learn from this experience on what they could try.\n\n### What did we learn?\nThis section should include perspective from everyone that was involved to celebrate the victories and identify areas for improvement. For example: What went well? What didn't go well? What should be done differently next time?\n\n### Follow-up tasks\nThis section lists the action items to turn learnings into changes that help the team become more proficient with iterations. It could include tweaking the playbook, publishing the retrospective, or other improvements. The best follow-ups will have a clear owner as well as due date.\n\n### Timeline highlights\nThis section is a curated log that details the most important moments. It can contain key communications, screen shots, or other artifacts. Use the built-in timeline feature to help you retrace and replay the sequence of events.",
cy.findByRole('combobox',{name:'Dropdown selector to change the interface language'}).should('have.attr','aria-autocomplete','list').and('have.attr','aria-labelledby','changeInterfaceLanguageLabel').as('inputEl');
cy.get('#aria-context').should('contain','option English (Australia) focused').and('contain','Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.');
cy.wrap($el).get('#aria-focused').should('contain','option English (Australia) focused');
cy.wrap($el).get('#aria-guidance').should('contain','Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.');
});
// # Check if language setting gets changed after user presses enter
cy.get('@inputEl').typeWithForce('{enter}');
// # Check if language setting gets changed after user presses space
cy.get('@ariaEl').get('#aria-selection-event').should('contain','option English (US), selected');
cy.get('@ariaEl').within(($el)=>{
cy.wrap($el).get('#aria-selection').should('contain','option English (US) selected');
});
});
it('MM-T1488 Profile Picture should read labels',()=>{
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов
Показать больше
Ссылка в новой задаче
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.