MM-29703 Mark threads as read when channels are marked (#15994)

Co-authored-by: Jesús Espino <jespinog@gmail.com>
Этот коммит содержится в:
Eli Yukelzon
2020-10-30 17:00:21 +02:00
коммит произвёл GitHub
родитель 1729239385
Коммит fe352ab57f
20 изменённых файлов: 451 добавлений и 92 удалений

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

@@ -14,6 +14,29 @@ type ThreadStore struct {
mock.Mock
}
// CollectThreadsWithNewerReplies provides a mock function with given fields: userId, channelIds, timestamp
func (_m *ThreadStore) CollectThreadsWithNewerReplies(userId string, channelIds []string, timestamp int64) ([]string, error) {
ret := _m.Called(userId, channelIds, timestamp)
var r0 []string
if rf, ok := ret.Get(0).(func(string, []string, int64) []string); ok {
r0 = rf(userId, channelIds, timestamp)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, []string, int64) error); ok {
r1 = rf(userId, channelIds, timestamp)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CreateMembershipIfNeeded provides a mock function with given fields: userId, postId
func (_m *ThreadStore) CreateMembershipIfNeeded(userId string, postId string) error {
ret := _m.Called(userId, postId)
@@ -246,3 +269,17 @@ func (_m *ThreadStore) UpdateMembership(membership *model.ThreadMembership) (*mo
return r0, r1
}
// UpdateUnreadsByChannel provides a mock function with given fields: userId, changedThreads, timestamp
func (_m *ThreadStore) UpdateUnreadsByChannel(userId string, changedThreads []string, timestamp int64) error {
ret := _m.Called(userId, changedThreads, timestamp)
var r0 error
if rf, ok := ret.Get(0).(func(string, []string, int64) error); ok {
r0 = rf(userId, changedThreads, timestamp)
} else {
r0 = ret.Error(0)
}
return r0
}