* MM-41211: Allows rollback without destroying previous config setting.
* MM-41211: Revert to original logic for unused config settings.
* MM-41211: Moves days defaults before hours defaults.
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Old versions of the Mattermost server did not qualify queries scanning both `Posts` and `Threads`, and choke on the ambiguity in deciding between the new `DeleteAt` on `Threads` and the `DeleteAt` on `Posts` in existing queries.
While this problem is transient only while running multiple server versions, it effectively makes our backwards compatibility guarantee void, not to mention complicating cloud deployments.
Work around this by renaming `Threads.DeleteAt` to `Threads.ThreadDeleteAt`. The old migration is nulled out, but remains, since some test servers have already upgraded and manually fixing each affected instance would be problematic. Thew new migration takes care of removing the old column -- if it ever existed.
Fixes: https://mattermost.atlassian.net/browse/MM-43770
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
We fall back to TeammateNameDisplay if a user display_name
preference is not found. This makes the logic consistent
with other parts of the app.
https://mattermost.atlassian.net/browse/MM-43829
```release-note
NONE
```
* MM-41211: Replaces SessionLength[Web|Mobile|SSO]InDays with SessionLength[Web|Mobile|SSO]InHours.
* MM-41211: Clear the value of the old config settings.
* Updating email templates for trial will end and trial will end emails
* put back variable
* Rebuilding
* fix tests
* Updates
* [MM-43339] Add Cloud Subscription Upgrade Confirmation Email (#19989)
* Add Cloud Upgrade Confirmation email
* Updates
* String change
* i18n-extract
* Updates
* make email-mocks
* Appease linter
* Add a test
* GMAIL NEVER RENDERS RIGHT
* Important EVERYWHERE because gmail just cant deal
* l
* Last one
* Update image
* Update tests
* Fix tests
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* [MM-42739] Initial setup for top channels for team
* [MM-42739] Add initial tests
* [MM-42739] Update tests
* [MM-42739] Add top channels for user
* [MM-42739] Fix query
* [MM-42739] Update query
* [MM-42739] Improve query performance
* [MM-42739] Remove rank
* [MM-42739] Fix tests to use new time range today
* [MM-42739] Add tests for top channels for user
* [MM-42739] Add test for pagination
* Remove top channels by time struct
* [MM-42739] Update test names
* [MM-42739] Remove rank from top reactions
* [MM-42739] Return empty array instead of nil when result is empty
* [MM-42739] Add additional tests and update permissions check for teams
* [MM-42739] Add excluded channel tests for top reactions
* [MM-42739] Move insights to api4/insights and keep time range as string until required
* [MM-42739] Update queries only check DeleteAt after union
* [MM-42739] Improve query performance by using publicchannels table
* [MM-42739] Fix broken query after merge
* Update minio-go dep to 7.0.24
* Bringing back some removed libraries
```release-note
NONE
```
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
* MM-41565,MM-42473: fixes incorrect unread thread count
The infamous "-1 unread threads" bug, was due to incorrectly counting
previous unread mentions and replies.
When we calculate the previous counts, we didn't take into account if
a thread was newly followed one or not. So when a user gets added to a
thread via a mention receives a WS event with the previous count values
calculated by subtracting "1" from the current count values.
In the result the webapp subtracts the previous values for the thread
from the total values of all threads for the user.
This is wrong since the user just followed the thread those previous values
should be 0. Which results into showing a negative value of unread
threads to the user.
This commit fixes this issue by zeroing the previous count values when
the user was not following the thread previously.
* Adds test, and addresses comments
* Changes test's description
* Removes unneeded assertion
* Empty commit just to re-build
The issue seems to be that different distros
have different set of included mime types
built-in. Go looks into those directories
and it looks like our CI systems don't have
those files.
https://mattermost.atlassian.net/browse/MM-42877
```release-note
NONE
```
* [MM-41185]: new API to mark thread as unread
Until now we mark a thread as read/unread by sending a timestamp to the
server. This created some issues when marking a thread as unread from a
post. We needed to send the post.create_at - 1 as a timestamp but we
didn't do so consistently.
This commit adds a new API to set a thread as unread by post id.
Making all clients agnostic of the timestamp, and thus solving consistency issues.
Endpoint: /api/v4/users/{user_id}/teams/{team_id}/threads/{thread_id}/set_unread/{post_id}
* Updates client.go adding SetThreadUnreadByPostId
* Guards endpoint behind read channel permission
* Returns status 400 if post_id not belong in thread
* Root post as post_id should be permitted