MM-54023: [Shared Channels] Filter out system posts for channel update info that is not synced (#30735)
* initial checkin * simplify tests, logic * fix tests * remove unneeded test * fix spacing * updates * update logic * fix logic * move filtering to DB * remove comment --------- Co-authored-by: Catalin Tomai <catalintomai@catalins-macbook-pro-2.home>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b6401d9042
Коммит
e6ed3436fb
@@ -270,9 +270,10 @@ func (scs *Service) fetchPostsForSync(sd *syncData) error {
|
||||
}()
|
||||
|
||||
options := model.GetPostsSinceForSyncOptions{
|
||||
ChannelId: sd.task.channelID,
|
||||
IncludeDeleted: true,
|
||||
SinceCreateAt: true,
|
||||
ChannelId: sd.task.channelID,
|
||||
IncludeDeleted: true,
|
||||
SinceCreateAt: true,
|
||||
ExcludeChannelMetadataSystemPosts: true,
|
||||
}
|
||||
cursor := model.GetPostsSinceForSyncCursor{
|
||||
LastPostUpdateAt: sd.scr.LastPostUpdateAt,
|
||||
@@ -463,7 +464,7 @@ func (scs *Service) fetchPostAttachmentsForSync(sd *syncData) error {
|
||||
return merr.ErrorOrNil()
|
||||
}
|
||||
|
||||
// filterPostsforSync removes any posts that do not need to sync.
|
||||
// filterPostsForSync removes any posts that do not need to sync.
|
||||
func (scs *Service) filterPostsForSync(sd *syncData) {
|
||||
filtered := make([]*model.Post, 0, len(sd.posts))
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user