Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Jesús Espino
9cc5089af8 Moving mlog to corelibs (#16915)
* Moving mlog to corelibs

* Regenerating app layers

* Fix golangci-lint problem

* Fixing golangci-lint errors

* Renaming from corelibs to shared

* Renaming from corelibs to shared

* Fixing import

* Fixing merge problems

* Fixing build
2021-03-05 09:18:37 +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
Amarjeet Anand
fb453d578f [MM-24526] Filter * characters from the search terms in DB (#14884) 2020-08-05 13:43:31 +02:00
Agniva De Sarker
2dba5dbf86 MM-21368: Optimize MapStringsToQueryParams (#13601)
- Use strings.Builder which minimizes allocations.
- Avoid fmt.Sprintf which is slower than simple string concat.

Results:

name                                      old time/op    new time/op    delta
MapStringsToQueryParams/one_item-8           512ns ± 2%     377ns ± 1%  -26.27%  (p=0.000 n=10+9)
MapStringsToQueryParams/multiple_items-8     858ns ± 5%     748ns ± 2%  -12.82%  (p=0.000 n=10+9)

name                                      old alloc/op   new alloc/op   delta
MapStringsToQueryParams/one_item-8            456B ± 0%      384B ± 0%  -15.79%  (p=0.000 n=10+9)
MapStringsToQueryParams/multiple_items-8      608B ± 0%      592B ± 0%   -2.63%  (p=0.000 n=10+10)

name                                      old allocs/op  new allocs/op  delta
MapStringsToQueryParams/one_item-8            8.00 ± 0%      6.00 ± 0%  -25.00%  (p=0.000 n=10+10)
MapStringsToQueryParams/multiple_items-8      12.0 ± 0%      12.0 ± 0%     ~     (all equal)
2020-01-09 07:44:01 -08:00
Jesús Espino
a63684fcb5 Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +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
Claudio Costa
814c234443 [MM-18036] Sanitize sql LIKE terms on search endpoints (#12044)
* Sanitize sql LIKE terms on search endpoints

* Add search term sanitization in additional places
2019-09-11 10:56:12 +02:00
κουκουλοφόρος
5b24c44e19 Add missing transaction rollbacks for SQL store (#9964)
* Add missing transaction rollbacks for SQL store

* Add `defer transaction.Rollback()` in SQL stores.

* abstract finalizeTransaction
2019-02-23 11:44:52 -08:00
Harrison Healey
5f65356a3f Address issues 2018-11-22 13:10:36 -05:00
Harrison Healey
48f16b6401 MM-11272 Added initial post metadata (#9175)
* MM-11272 Added app.PreparePostForClient

* MM-11272 Added app.PreparePostListForClient

* MM-11272 Added EmojiStore.GetMultipleByName

* MM-11272 Added emojis to PreparePostForClient

* MM-11272 Added unit tests for getting reaction counts

* MM-11272 Added unit tests for TestPreparePostForClient

* MM-11272 Added emojis from reactions to Post.Emojis

* MM-11272 Always update post.UpdateAt when reactions change to bust cache

* Fixed merge conflicts

* Moved post metadata-related code into its own file

* Update store mocks

* Fixed typo

* Add missing license headers

* Updated post metadata tests when custom emojis are disabled

* Fix unreliable unit tests

* Fix inconsistent casing in SQL statements

* Fix blank line

* Invalidate store cache after making changes

* Clear post cache synchronously with reactions
2018-11-01 15:22:33 -04:00