Files
byre/internal/store/notifications.go
T

21 lines
845 B
Go
Raw Normal View History

package store
import (
"context"
2026-10-18 15:32:07 -07:00
"g.fc.run/ai/byre/internal/api"
)
func (s *Store) UpdateNotificationPrefs(ctx context.Context, login string, prefs api.NotificationPrefs) (api.User, error) {
return s.updateUser(ctx, login, `notify_questions = ?, notify_reports = ?, notify_errors = ?, notify_rate_limits = ?, notify_ready = ?, notify_discard = ?, notify_merge_problems = ?, notify_workflows = ?`,
prefs.Questions, prefs.Reports, prefs.Errors, prefs.RateLimits, prefs.Ready, prefs.Discard, prefs.MergeProblems, prefs.Workflows)
}
func (s *Store) UpdateDefaultModel(ctx context.Context, login, model string) (api.User, error) {
return s.updateUser(ctx, login, `default_model = ?`, model)
}
2026-10-18 22:56:33 -07:00
2026-10-19 21:40:24 -07:00
func (s *Store) UpdateAway(ctx context.Context, login string, away bool) (api.User, error) {
return s.updateUser(ctx, login, `away = ?`, away)
2026-10-19 21:40:24 -07:00
}