[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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
132f114793
Коммит
04b27ce93c
@@ -170,7 +170,7 @@ func (job *EmailBatchingJob) checkPendingNotifications(now time.Time, handler fu
|
||||
continue
|
||||
}
|
||||
|
||||
for _, channelMember := range *channelMembers {
|
||||
for _, channelMember := range channelMembers {
|
||||
if channelMember.LastViewedAt >= batchStartTime {
|
||||
mlog.Debug("Deleted notifications for user", mlog.String("user_id", userID))
|
||||
delete(job.pendingNotifications, userID)
|
||||
|
||||
@@ -96,7 +96,7 @@ func TestCheckPendingNotifications(t *testing.T) {
|
||||
_, err = th.store.Channel().UpdateMember(channelMember)
|
||||
require.NoError(t, err)
|
||||
|
||||
nErr := th.store.Preference().Save(&model.Preferences{{
|
||||
nErr := th.store.Preference().Save(model.Preferences{{
|
||||
UserId: th.BasicUser.Id,
|
||||
Category: model.PreferenceCategoryNotifications,
|
||||
Name: model.PreferenceNameEmailInterval,
|
||||
@@ -118,7 +118,7 @@ func TestCheckPendingNotifications(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// We reset the interval to something shorter
|
||||
nErr = th.store.Preference().Save(&model.Preferences{{
|
||||
nErr = th.store.Preference().Save(model.Preferences{{
|
||||
UserId: th.BasicUser.Id,
|
||||
Category: model.PreferenceCategoryNotifications,
|
||||
Name: model.PreferenceNameEmailInterval,
|
||||
@@ -254,7 +254,7 @@ func TestCheckPendingNotificationsCantParseInterval(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// preference value is not an integer, so we'll fall back to the default 15min value
|
||||
nErr := th.store.Preference().Save(&model.Preferences{{
|
||||
nErr := th.store.Preference().Save(model.Preferences{{
|
||||
UserId: th.BasicUser.Id,
|
||||
Category: model.PreferenceCategoryNotifications,
|
||||
Name: model.PreferenceNameEmailInterval,
|
||||
|
||||
Ссылка в новой задаче
Block a user