* Optimise creation of dm

* Handle direct channels with the same user

* Cover GetMany with specs and add it on tha cache layer as well

* Fix specs by handling user dming themselves

* Apply PR suggestions

* Apply PR suggestions

* Use require.NoError instead of require.Nil on userstore test

* Improve readability of GetOrCreateDirectChannel

* Apply PR suggestions

* Update layers

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
John Tzikas
2021-02-10 15:51:04 +02:00
коммит произвёл GitHub
родитель 0e9ad9f7f8
Коммит 1e3b6b56a6
12 изменённых файлов: 297 добавлений и 58 удалений

Просмотреть файл

@@ -323,6 +323,7 @@ type UserStore interface {
UpdateMfaSecret(userId, secret string) error
UpdateMfaActive(userId string, active bool) error
Get(id string) (*model.User, error)
GetMany(ids []string) ([]*model.User, error)
GetAll() ([]*model.User, error)
ClearCaches()
InvalidateProfilesInChannelCacheByUser(userId string)