always show media for subreddit requests

This commit is contained in:
Andre Medeiros 2022-05-30 14:22:21 -04:00
parent 6ece4c784a
commit b29f120eea
2 changed files with 3 additions and 1 deletions

View file

@ -202,6 +202,7 @@ func (sc *subredditsConsumer) Consume(delivery rmq.Delivery) {
reddit.WithQuery("before", before),
reddit.WithQuery("limit", "100"),
reddit.WithQuery("show", "all"),
reddit.WithQuery("always_show_media", "1"),
)
if err != nil {
@ -268,6 +269,7 @@ func (sc *subredditsConsumer) Consume(delivery rmq.Delivery) {
subreddit.Name,
reddit.WithQuery("limit", "100"),
reddit.WithQuery("show", "all"),
reddit.WithQuery("always_show_media", "1"),
)
if err != nil {

View file

@ -222,7 +222,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
i = rand.Intn(len(watchers))
watcher = watchers[i]
rac = tc.reddit.NewAuthenticatedClient(watcher.Account.AccountID, watcher.Account.RefreshToken, watcher.Account.AccessToken)
hps, err := tc.reddit.SubredditHot(tc, subreddit.Name, reddit.WithQuery("show", "all"))
hps, err := tc.reddit.SubredditHot(tc, subreddit.Name, reddit.WithQuery("show", "all"), reddit.WithQuery("always_show_media", "1"))
if err != nil {
tc.logger.Error("failed to fetch hot posts",
zap.Error(err),