Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Eli Yukelzon
2020-10-15 18:01:16 +03:00
коммит произвёл GitHub
родитель 944841a237
Коммит 8844141df3
15 изменённых файлов: 686 добавлений и 10 удалений

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

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