MM-35133 trigger sync user immediately after change (#17579)

- ensure changes to user profile sync immediately
- refactor sync send
Этот коммит содержится в:
Doug Lauder
2021-05-20 12:07:40 -04:00
коммит произвёл GitHub
родитель 36dd0005d2
Коммит 2b02b03497
31 изменённых файлов: 1591 добавлений и 914 удалений

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

@@ -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 ||