reddit-to-telegram 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reddit_to_telegram/post.rb +6 -2
- data/lib/reddit_to_telegram/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d1bb9660df8f6218a7bcbbbaa14b7e334fca34806c6923db6342ec41d6b44bb
|
4
|
+
data.tar.gz: 3adf418255edb66a94efd73cb08a603570ad72278fe6ab45177a7ff64232385b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616ec4f213bc2d759aff599a6260f86d131173353e329a911ee4287082ec7b0b29f2dec1a2b3db19cc6da22b3c1c13b9e339db293411ffb43d9b2879a30fba47
|
7
|
+
data.tar.gz: d401484d93b7ae2e5537074e3c72219b1b267ad29a5e49cd0d944361654a6808d2f7f3df36123d05805c4e213be78f522cbd67623c6ff1d99dfdad0466986df2
|
@@ -39,7 +39,11 @@ module RedditToTelegram
|
|
39
39
|
return unless res_ok?(res)
|
40
40
|
|
41
41
|
post = find_new_post(subreddit, res)
|
42
|
-
|
42
|
+
|
43
|
+
if post.nil?
|
44
|
+
Configuration.logger.info("Could not find a new post to push")
|
45
|
+
return
|
46
|
+
end
|
43
47
|
|
44
48
|
res = Telegram::Post.push(post, telegram_chat_id, opts)
|
45
49
|
Store::Posts.add(subreddit, post[:id])
|
@@ -50,7 +54,7 @@ module RedditToTelegram
|
|
50
54
|
if res.nil?
|
51
55
|
Configuration.logger.warn("Could not fetch Reddit post")
|
52
56
|
false
|
53
|
-
elsif res[:type].nil?
|
57
|
+
elsif res.is_a?(Hash) && res[:type].nil?
|
54
58
|
Configuration.logger.warn("Could not determine Reddit post type")
|
55
59
|
false
|
56
60
|
else
|