Load channelType from settings

This commit is contained in:
Peter Stuifzand 2019-03-07 21:33:25 +01:00
parent 19ee6c927a
commit 2ab2ac5e3c
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -22,7 +22,14 @@ func (b *memoryBackend) getTimeline(channel string) TimelineBackend {
timelineType := "sorted-set"
if channel == "notifications" {
timelineType = "stream"
} else {
if setting, ok := b.Settings[channel]; ok {
if setting.ChannelType != "" {
timelineType = setting.ChannelType
}
}
}
if timelineType == "sorted-set" {
timeline := &redisSortedSetTimeline{channel}
err := timeline.Init()