mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-21 19:37:41 +00:00
always show media for subreddit requests
This commit is contained in:
parent
6ece4c784a
commit
b29f120eea
2 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue