* MM-42191: Include deleted posts: Add includeDeleted query parameter for getPostsForChannel
* MM-42191: Fix error typo for includeDeleted query parameter
* MM-42191: Include deleted posts: Set permission error when deleted posts are requested by non system admins
* MM-42191: Include deleted posts: Refactor replyCountSubQuery and conditions when includeDeleted is not presented, refactor getRootPosts
* MM-42191: Include deleted posts: Refactor getRootPosts function along with skipFetchThreads and includeDeleted
* MM-42191: Include deleted posts: Rename includeDeleted to include_deleted param
* MM-42191: Include deleted posts: Fix failed posts unit tests
* MM-42191: Include deleted posts: Add missing include deleted option in multiple queries
* MM-42191: Include deleted posts: Add tests for include deleted option in TestGetPostsForChannel, TestGetPostsBefore, TestGetPostsAfter
* MM-42191: include deleted posts: Add tests cases for post store test
* MM-42191: Include deleted posts: Add extra unit test to ensure not returning deleted posts when IncludeDelete is false
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* allow custom pluginSettingTypes to have a placeholder
* i18n
* lock it down with a test case
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-46408: adds PostPriority feature flag
Adds the PostPriority feature flag. You can enable it by setting the
env variable `MM_FEATUREFLAGS_POSTPRIORITY=true`.
* Adds support for admin setting
* empty
* Uses post priority in telemetry
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Allow embedded JSON in config.json for AdvancedLoggingConfig
* fix escaped JSON case
* Add unit test cases for escaped JSON
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
The props map was being null, but the schema did not
allow nulls. Therefore, the whole response was being
set to null. There was no error which created more
confusion.
To avoid making the property nillable, which would
mean sending pointers to maps, we just create
empty maps if they are nil.
https://mattermost.atlassian.net/browse/MM-46869
```release-note
NONE
```
* Adds OmitConnection parameter to broadcast
Currently we have no means to omit sending a websocket event to a
specific connection id.
This is needed mainly so that the initiator won't receive an event for
the action it just initiated.
Will be used for the global drafts feature, so that we won't update
drafts through ws when a user is typing.
This commit adds OmitConnection to the Broadcast struct and to the
NewWebSocketEvent function signature.
shouldSendEvent should return false for that specific connection.
* Return early only if connection id matches the omitted
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add api endpoints, app layers for top inactive channels with dummy store calls
* Add store functions for top inactive channels
* Add model, store, app tests.
* Add client function and api tests
* Add participants information to TopInactiveChannel
* Translation fix
* Style fix while writing response
* Return channelmember IDs instead of profiles, query in batch avoiding inside the loop
* Make the following changes
- move DeleteAt to subqueries, to avoid select, group by
- Remove TeamId from response
- Count bots and webhook posts
* SQL query lint fix, store test fix to include bot messages
* make app-layers
* Fix empty participant lists being sent as [""]
* Track channel joins, to distinguish 0 activity channels vs new channels
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-45120: Starts tracking team join time. Adds API to retrieve team members who joined after a given time.
* MM-45120: Updates json casing to match model.User.
* MM-45713 - change 500 error to json object
* validate possible encoding errors and follow standards
* replace normal debugging string with true string
* use bool type instead of string
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This PR adds the post reminder backend work.
We add a new API endpoint via which a user can set a reminder for a post. An ephemeral message will be sent down the line to let the user know about the action. And then after the time is over, the system admin bot will send a DM message to the user about the reminder post.