* Update BuildPushNotificationMessage (#12974)
* Update BuildPushNotificationMessage
* Included Category, Version, and Type
* Remove unnecessary function args
* [MM-16232] Build and return fetched notification (#13085)
* Build and return fetched notification
* Remove check on PushNotificationContents
* Ran i18n-extract
* Get UserId from session
* Re-add ReturnStatusOK
* Remove UserId from PushNotificationAck
* Always include channel name
* [MM-16232] Return after writing response and add default message (#13127)
* Return after writing response and add default message
* Include channel ID as well
* Localize default message
* Fix i18n
* MM-17549: use StatusNotFound when deleting plugin (#12983)
Trying to delete a plugin that does not exist should fail with a 404, not a 400.
Relates-to: https://mattermost.atlassian.net/browse/MM-17549
* MM-19630: marketplace: model ReleaseNotesURL (#13083)
Automatic Merge
* MM-20065: allow prepackaged plugin upgrade (#13076)
* MM-20065: allow prepackaged plugin upgrade
When locally installing prepackaged plugins, skip if a plugin exists with the same id and is the same or a newer version.
This is effectively a "poor man's" rework of prepackaged plugins to allow upgrade of prepackaged plugins via the marketplace. The larger plan to rework prepackaged plugins was deferred from v5.18.
Fixes: https://mattermost.atlassian.net/browse/MM-20065
* eliminate unnecessary installPlugin
* fix TestPluginSync defaults to match minio
* cleanExistingBundles
* close prepackaged filereader
* simplify
* Filter out InviteId in Team sanitize function
* Keep InviteId for authorized users
* Update team sanitization tests
* Improve tests and revert conflicting lines
* First pass at searching archived channels
* Create endpoint for archived channels
* Update test for GetPublicChannelsForTeam
* Fix unit test for archived channels
* Rename includeDeleted to onlyDeleted
* Remove new /archived endpoint in favour of existing /deleted endpoint
* Fix broken test
* Remove manage team permission from /deleted endpoint
* Fix deletedChannels test
* Test for searching archived channels
* Only return private deleted channels user was a member of
* SearchArchivedChannels also searches private channels (user is a member of)
* Remove for loop to simplify append
* Remove userId from Client4 searcArchivedChannels
The ID field of Gitlab OAuth data was generated as a random number
between 1-1000. Unfortunately, this gave a 1 in 1 million chance of two
users generated this way colliding and meaning if you had two test users
in a test case they silently ended up actually being the exact same
user. We don't actually need to generate this randomly, so instead
change to having the test cases explicitly set the ID number so the
behaviour is as expected and completely deterministic.
As you'd expect, with odds of exactly a million to 1, it just might
(and in this case, it did indeed) happen.
* Adding interplugin communication.
* Naming changes and moving ResponseTransfer to own file.
* Fix.
* Tests and moving to buffering bytes.
* Switching API to passing plugin ID through path rather than a header.
* Review feedback.
* Add SetWithOptions
* Avoid passing two structs to the functions
* Rename ExpiryInSeconds -> ExpireInSeconds
* Use t.Run for the tests
* Fix build
* Address feedback
* Update log message
* Update docs and use KVSetWithOptions in KVCompareAndSetJSON
* Improve code style
* Use struct instead of pointer to struct
* Fix minimum server versions
* Update documentation
* Address feedback
* Revert new implemention of kv helpers
* Adress feedback
* When patching a bot, perform these two additional steps:
1. Update the user.UpdateAt value for the user/bot.
2. send the websocket event so all clients know a user update has
occured. This will tell clients to update the displayname
* Add check for UpdateAt. Check that createdBot.UpdateAt is not equal
to patchedBot.UpdateAt
* re-add unintentional empty line delete in previous commit
* Don't create a fake updateAt time. Let the Update() method handle the
change. User the returned updateUser for sending updated user event
* Include user_name, team_domain and channel_name when clicking an interactive button
* Fixed api4's TestPostActionCookies test
* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.
* Further optimizations to database requests
* Removed useless goroutine when fetching channel
This changes the bulk import so when it needs to generate a password
because no password or auth data was supplied, it now takes into account
the configured minimum length, as well as assuming all other distinct
character types are configured to be required. It should now generate
valid passwords regardless of the password policy configuration in the
Mattermost configuration file.
- Add stringutils with method that "stringify" object slices
- "stringify" means convert each object to its string representation
- Move plugin.Log* implementations to client_rpc, use stringify method before calling server method
- Exclude Log* methods from generated RPC methods
- No signature change for plugin.Log* API
- Add test in plugin_api_test to use plugin.Log* methods with RPC
* [MM-13704] Updated CLI to set DeleteAt in groupmemebrs
* [MM-13704] Updated Mock Test
* [MM-13704] Refactored to use current pattern to write function
* [MM-13704] Small text change
* [MM-13704] updated translation
* [MM-13704] Updated params of error function
* [MM-13704] Fixed confusion between channel and group store
* [MM-13704] Addressed PR comments
* [MM-13704] Added test case
* [MM-13704] Fixed err declaration
Today, the server emits a system message containing one of `<username> left the channel.` or `<username> removed from the channel.` when such an event occurs.
While the client interprets this special kind of message to take into account the enduser's username display settings (e.g. to render `First Last left the channel.`), the server also processes this "message" to look for mentions.
With the user in question no longer in the channel, it incorrectly splits usernames containing a period into two tokens and tries to mentions users accordingly. So `christopher.poile` ends up trying to mention `christopher` and `poile`. If such a user exists, they receive a spurious mention for this event.
Change the message rendered by the server to explicitly prepend an `@`, which in turn is detected by the mention logic to avoid splitting. As above, this has no effect on the client-side rendered message.
* add ability to upload other plugins to the plugin API
* generated client rpc glue code
* fix UploadPlugin API signature
* generated plugin mocks
* added upload plugin test
* removed unused comment
* using single line to call InstallPlugin with file Reader
* fix minimum server version
* added successful plugin upload test
* renamed UploadPlugin to InstallPlugin