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
@@ -1525,6 +1525,14 @@ func (s *SqlPostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOp
|
||||
query = query.Where(sq.NotEq{"COALESCE(Posts.RemoteId,'')": options.ExcludeRemoteId})
|
||||
}
|
||||
|
||||
if options.ExcludeChannelMetadataSystemPosts {
|
||||
query = query.Where(sq.NotEq{"Posts.Type": []string{
|
||||
model.PostTypeHeaderChange,
|
||||
model.PostTypeDisplaynameChange,
|
||||
model.PostTypePurposeChange,
|
||||
}})
|
||||
}
|
||||
|
||||
queryString, args, err := query.ToSql()
|
||||
if err != nil {
|
||||
return nil, cursor, errors.Wrap(err, "getpostssinceforsync_tosql")
|
||||
|
||||
Ссылка в новой задаче
Block a user