diff --git a/src/types.nim b/src/types.nim
index d9fc747..2bc2309 100644
--- a/src/types.nim
+++ b/src/types.nim
@@ -224,7 +224,10 @@ type
redisMaxConns*: int
redisPassword*: string
+ replaceTwitter*: string
replaceYouTube*: string
+ replaceReddit*: string
+ replaceInstagram*: string
Rss* = object
feed*, cursor*: string
diff --git a/src/views/rss.nimf b/src/views/rss.nimf
index 151d91d..f76be33 100644
--- a/src/views/rss.nimf
+++ b/src/views/rss.nimf
@@ -2,6 +2,13 @@
#import strutils, xmltree, strformat, options
#import ../types, ../utils, ../formatters
#
+#proc getPrefs(cfg: Config): Prefs =
+#result.replaceTwitter = cfg.replaceTwitter
+#result.replaceYouTube = cfg.replaceYouTube
+#result.replaceReddit = cfg.replaceReddit
+#result.replaceInstagram = cfg.replaceInstagram
+#end proc
+#
#proc getTitle(tweet: Tweet; prefs: Prefs; retweet: string): string =
#if tweet.pinned: result = "Pinned: "
#elif retweet.len > 0: result = &"RT by @{retweet}: "
@@ -74,7 +81,6 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
#end proc
#
#proc renderTimelineRss*(timeline: Timeline; profile: Profile; cfg: Config; multi=false): string =
-#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
#let urlPrefix = getUrlPrefix(cfg)
#result = ""
#let user = (if multi: "" else: "@") & profile.username
@@ -99,14 +105,13 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
128
#if timeline.content.len > 0:
-${renderRssTweets(timeline.content, prefs, cfg)}
+${renderRssTweets(timeline.content, getPrefs(cfg), cfg)}
#end if
#end proc
#
#proc renderListRss*(tweets: seq[Tweet]; list: List; cfg: Config): string =
-#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
#let link = &"{getUrlPrefix(cfg)}/{list.username}/lists/{list.name}"
#result = ""
@@ -118,13 +123,12 @@ ${renderRssTweets(timeline.content, prefs, cfg)}
${getDescription(list.name & " by @" & list.username, cfg)}
en-us
40
-${renderRssTweets(tweets, prefs, cfg)}
+${renderRssTweets(tweets, getPrefs(cfg), cfg)}
#end proc
#
#proc renderSearchRss*(tweets: seq[Tweet]; name, param: string; cfg: Config): string =
-#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
#let link = &"{getUrlPrefix(cfg)}/search"
#let escName = xmltree.escape(name)
#result = ""
@@ -137,7 +141,7 @@ ${renderRssTweets(tweets, prefs, cfg)}
${getDescription("Search \"" & escName & "\"", cfg)}
en-us
40
-${renderRssTweets(tweets, prefs, cfg)}
+${renderRssTweets(tweets, getPrefs(cfg), cfg)}
#end proc