aboutsummaryrefslogtreecommitdiff
path: root/service/service.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-29 11:32:24 +0000
committerr <r@freesoftwareextremist.com>2019-12-29 11:32:24 +0000
commit9e556721c507f5cfbafa32afbfa80b70c6f0eca1 (patch)
tree20f00fa29a6425279359b34e6613f60d5fa315f6 /service/service.go
parentede1bb42758d31e2537ba8545b3a403fc94f6cdb (diff)
downloadbloat-9e556721c507f5cfbafa32afbfa80b70c6f0eca1.tar.gz
bloat-9e556721c507f5cfbafa32afbfa80b70c6f0eca1.zip
Add default settings
Diffstat (limited to 'service/service.go')
-rw-r--r--service/service.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/service/service.go b/service/service.go
index d9482c8..c9c48eb 100644
--- a/service/service.go
+++ b/service/service.go
@@ -90,10 +90,12 @@ func (svc *service) GetAuthUrl(ctx context.Context, instance string) (
}
sessionID = util.NewSessionId()
- err = svc.sessionRepo.Add(model.Session{
+ session := model.Session{
ID: sessionID,
InstanceDomain: instance,
- })
+ Settings: *model.NewSettings(),
+ }
+ err = svc.sessionRepo.Add(session)
if err != nil {
return
}
@@ -276,6 +278,10 @@ func (svc *service) ServeTimelinePage(ctx context.Context, client io.Writer,
return err
}
+ for i := range statuses {
+ statuses[i].ThreadInNewTab = c.Session.Settings.ThreadInNewTab
+ }
+
if len(maxID) > 0 && len(statuses) > 0 {
hasPrev = true
prevLink = fmt.Sprintf("/timeline/$s?min_id=%s", timelineType, statuses[0].ID)