MM-28249 Auto follow threads (#15878)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
944841a237
Коммит
8844141df3
@@ -347,6 +347,7 @@ type ServiceSettings struct {
|
||||
EnableLocalMode *bool
|
||||
LocalModeSocketLocation *string
|
||||
EnableAWSMetering *bool
|
||||
ThreadAutoFollow *bool `access:"experimental"`
|
||||
}
|
||||
|
||||
func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
@@ -764,6 +765,11 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
if s.EnableAWSMetering == nil {
|
||||
s.EnableAWSMetering = NewBool(false)
|
||||
}
|
||||
|
||||
if s.ThreadAutoFollow == nil {
|
||||
s.ThreadAutoFollow = NewBool(true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type ClusterSettings struct {
|
||||
|
||||
@@ -22,3 +22,16 @@ func (o *Thread) ToJson() string {
|
||||
func (o *Thread) Etag() string {
|
||||
return Etag(o.PostId, o.LastReplyAt)
|
||||
}
|
||||
|
||||
type ThreadMembership struct {
|
||||
PostId string `json:"post_id"`
|
||||
UserId string `json:"user_id"`
|
||||
Following bool `json:"following"`
|
||||
LastViewed int64 `json:"last_view_at"`
|
||||
LastUpdated int64 `json:"last_update_at"`
|
||||
}
|
||||
|
||||
func (o *ThreadMembership) ToJson() string {
|
||||
b, _ := json.Marshal(o)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user