From f039df69a5e210cef35f9efd9f5d673172140fcc Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Thu, 9 May 2019 21:41:54 +0200 Subject: [PATCH] Add default settings for ChannelType --- cmd/eksterd/http.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/eksterd/http.go b/cmd/eksterd/http.go index 59c55dc..73f8dda 100644 --- a/cmd/eksterd/http.go +++ b/cmd/eksterd/http.go @@ -348,6 +348,14 @@ func (h *mainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } else { page.CurrentSetting = channelSetting{} } + // TODO: similar code is found in timeline.go + if page.CurrentSetting.ChannelType == "" { + if v.UID == "notifications" { + page.CurrentSetting.ChannelType = "stream" + } else { + page.CurrentSetting.ChannelType = "sorted-set" + } + } break } }