MM-35133 trigger sync user immediately after change (#17579)
- ensure changes to user profile sync immediately - refactor sync send
Этот коммит содержится в:
@@ -241,15 +241,15 @@ type GetPostsSinceOptions struct {
|
||||
SortAscending bool
|
||||
}
|
||||
|
||||
type GetPostsSinceForSyncCursor struct {
|
||||
LastPostUpdateAt int64
|
||||
LastPostId string
|
||||
}
|
||||
|
||||
type GetPostsSinceForSyncOptions struct {
|
||||
ChannelId string
|
||||
Since int64 // inclusive
|
||||
Until int64 // inclusive
|
||||
SortDescending bool
|
||||
ExcludeRemoteId string
|
||||
IncludeDeleted bool
|
||||
Limit int
|
||||
Offset int
|
||||
}
|
||||
|
||||
type GetPostsOptions struct {
|
||||
@@ -472,6 +472,14 @@ func (o *Post) IsRemote() bool {
|
||||
return o.RemoteId != nil && *o.RemoteId != ""
|
||||
}
|
||||
|
||||
// GetRemoteID safely returns the remoteID or empty string if not remote.
|
||||
func (o *Post) GetRemoteID() string {
|
||||
if o.RemoteId != nil {
|
||||
return *o.RemoteId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (o *Post) IsJoinLeaveMessage() bool {
|
||||
return o.Type == POST_JOIN_LEAVE ||
|
||||
o.Type == POST_ADD_REMOVE ||
|
||||
|
||||
@@ -112,7 +112,8 @@ type SharedChannelRemote struct {
|
||||
IsInviteAccepted bool `json:"is_invite_accepted"`
|
||||
IsInviteConfirmed bool `json:"is_invite_confirmed"`
|
||||
RemoteId string `json:"remote_id"`
|
||||
NextSyncAt int64 `json:"next_sync_at"`
|
||||
LastPostUpdateAt int64 `json:"last_post_update_at"`
|
||||
LastPostId string `json:"last_post_id"`
|
||||
}
|
||||
|
||||
func (sc *SharedChannelRemote) ToJson() string {
|
||||
@@ -211,6 +212,12 @@ func (scu *SharedChannelUser) IsValid() *AppError {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetUsersForSyncFilter struct {
|
||||
CheckProfileImage bool
|
||||
ChannelID string
|
||||
Limit uint64
|
||||
}
|
||||
|
||||
// SharedChannelAttachment stores a lastSyncAt timestamp on behalf of a remote cluster for
|
||||
// each file attachment that has been synchronized.
|
||||
type SharedChannelAttachment struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user