[MM-28985] Remove pointers to slice (part 1) (#18034)

* Remove pointers to slice (part 1)

* Remove use of pointers to slice from model package (#18045)

* Fix after merge
Этот коммит содержится в:
Claudio Costa
2021-08-17 11:18:33 +02:00
коммит произвёл GitHub
родитель 132f114793
Коммит 04b27ce93c
64 изменённых файлов: 767 добавлений и 771 удалений

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

@@ -437,11 +437,11 @@ func (a *App) RemoveCustomStatus(userID string) *model.AppError {
}
func (a *App) addRecentCustomStatus(userID string, status *model.CustomStatus) *model.AppError {
var newRCS *model.RecentCustomStatuses
var newRCS model.RecentCustomStatuses
pref, err := a.GetPreferenceByCategoryAndNameForUser(userID, model.PreferenceCategoryCustomStatus, model.PreferenceNameRecentCustomStatuses)
if err != nil || pref.Value == "" {
newRCS = &model.RecentCustomStatuses{*status}
newRCS = model.RecentCustomStatuses{*status}
} else {
existingRCS := model.RecentCustomStatusesFromJson(strings.NewReader(pref.Value))
newRCS = existingRCS.Add(status)