feat(feeds): add optional sandboxed in-tab article preview
Build and publish container images / images (push) Successful in 10m41s
Release container images / release (push) Successful in 24s

This commit is contained in:
Anya Tokugawa committed 2026-11-08 13:55:22 +09:00
1 parent ea1ca432c5
commit f4869c7c8b
10 files changed
+68 -5

No files matched your search

+8 -1
View File
@@ -64,6 +64,7 @@ type TaskPreferences struct {
Version int64 `json:"version"`
ProjectUUID string `json:"project_uuid"`
WikiPrefix string `json:"wiki_prefix"`
RSSLinkMode string `json:"rss_link_mode"`
AssigneeUUID string `json:"assignee_uuid"`
DueDays *int `json:"due_days"`
StartDays *int `json:"start_days"`
@@ -80,7 +81,7 @@ type TaskPreferences struct {
}
func (s *Store) TaskPreferences(ctx context.Context, domain, actor string) (TaskPreferences, error) {
p := TaskPreferences{AssigneeUUID: actor, Complexity: 1, ReminderTime: "09:00", DigestTime: "09:00", Timezone: "UTC"}
p := TaskPreferences{AssigneeUUID: actor, Complexity: 1, ReminderTime: "09:00", DigestTime: "09:00", Timezone: "UTC", RSSLinkMode: "tab"}
if err := taskActor(ctx, s.DB, domain, actor, false); err != nil {
return p, err
}
@@ -123,6 +124,12 @@ func (s *Store) SaveTaskPreferences(ctx context.Context, domain, actor string, p
if _, err := ExpandWikiPrefix(p.WikiPrefix, "subject", now); err != nil {
return p, ErrTaskInvalid
}
if p.RSSLinkMode == "" {
p.RSSLinkMode = "tab"
}
if p.RSSLinkMode != "tab" && p.RSSLinkMode != "embedded" {
return p, ErrTaskInvalid
}
// Older clients do not send this field. Preserve their default clock.
if p.ReminderTime == "" {
p.ReminderTime = "09:00"