Commit Graph

17 Commits

Author SHA1 Message Date
Jesús Espino
35d00b4644 Enable the errorAssertions govet check for mattermost-server code (#17346)
* Enable the errorAssertions govet check for mattermost-server code

* Removing unnecesary change

* Fixing some tests

* Fixing tests

* Fixing more after merge

* Fixing new offending entries

* Fixing small vet checks

* Fixing new cases detected by govet

* Fixing remote_cluster_test errors

* Fixing assertion

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-12 12:51:31 +02:00
catalintomai
e37e902ddf MM-29584: Make apps plugin hook invocation/registration conditional (#16769) 2021-04-11 19:54:46 -07:00
Jesús Espino
857e18f3ab Replacing require.nil in plugin package (#16961)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-03-09 09:45:00 +01:00
Agniva De Sarker
e89b26e8f3 goimports (#16640)
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`

* added goimports lint check to .golangci.yml

* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case

* make app-layers, *-mocks and store-layers for ci check

Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-07 22:42:43 +05:30
Agniva De Sarker
c1dd23a3c8 MM-31063: Change constants to use CamelCase (#16608)
* MM-31063: Change constants to use CamelCase

* store package

* change allcaps to camel case (#16615)

* New tools.mod

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2021-01-04 11:32:29 +05:30
Harshil Sharma
dea705969c MM-13934 - Plugin helper function EnsureBot doesn't compare bot details (#14103) 2020-05-27 14:48:43 +02:00
Vladimir Lebedev
722924b910 MM-19508 Extend ShouldProcessMessage to filter out from_webhoo… (#13270)
Extend ShouldProcessMessage to filter out from_webhook posts
2019-12-19 20:52:41 +01:00
Ben Schumacher
5122b9e292 [MM-20723] Add golint for plugin package to golangci (#13090) 2019-12-05 20:31:53 +01:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Rajat Varyani
f2fcfa8f9d [MM-16709] Add helper method for plugins using MessageHasBeenPosted (#12539)
The PR introduces a method in helper interface. The method has common code for filtering to be used across plugins which use MessageHasBeenPosted.
2019-11-18 10:47:32 +01:00
Alex Sahin
6b0a88debf [MM-17297] Extend EnsureBot helper to include bot images (#12153) 2019-11-15 05:19:00 +01:00
Rajat Varyani
14b1777959 [MM-19153] Add server version check in helper methods for plugins (#12675) 2019-11-06 17:42:46 +01:00
jatinjtg
0ba6a791ef Fix typo (#12655) 2019-10-15 15:45:46 +02:00
Jesse Hallam
620d941b6e MM-8602: KV Store Json helper tweaks (#11502)
* move kv helpers to helpers_kv*.go

* change KVGetJSON return signature

Return a boolean and an error, to clearly indicate if no value was found and thus no value unmarshalled into the target interface.

Also fix an issue with CompareAndSet to allow an oldValue of nil (i.e.
expected to be unset).

* add missing license

* tweak documentation

* document KVSetWithExpiryJSON minimum version
2019-07-05 17:33:39 -03:00
Zachary Romero
46f2b18e4f Add KV helper methods to Helpers interface (#11307)
* Add KV helper methods to Helpers interface

* Address code-review comments, add unit tests

* Update documentation for KVCompareAndSetJSON.

* Update assertions for helpers_bots_test.go

* Fix assertion not called name in test.
2019-06-28 09:27:46 -04:00
Christopher Speller
31d695f951 Preventing plugin startup failure if bot account already exists as regular user. (#11077) 2019-06-10 07:39:42 -07:00
Christopher Speller
6d336e0666 Adding EnsureBot plugin helper. (#10542)
* Adding EnsureBot plugin helper.

* Removing unessisary GetBot call.

* Moving to own file and error handling cleanup.

* Removing patch functionaliy. Plugins should manage their own bot account updates for now.

* Adding tests and cleaning up errors.

* Modify to not shadow err.

* Moving helpers to seperate interface.

* Feedback fixes
2019-05-06 12:44:38 -07:00