lib/ayadn/workers.rb in ayadn-1.7.7 vs lib/ayadn/workers.rb in ayadn-1.8.0
- old
+ new
@@ -234,18 +234,22 @@
else
values[:is_starred] = false
values[:num_stars] = 0
end
+ if post['num_replies']
+ values[:num_replies] = post['num_replies']
+ else
+ values[:num_replies] = 0
+ end
+
if post['reply_to']
values[:is_reply] = true
values[:reply_to] = post['reply_to']
- values[:num_replies] = post['num_replies']
else
values[:is_reply] = false
values[:reply_to] = nil
- values[:num_replies] = 0
end
if post['num_reposts']
values[:num_reposts] = post['num_reposts']
else
values[:num_reposts] = 0
@@ -341,9 +345,11 @@
if ch['has_unread']
unread = "This channel has unread message(s)"
else
unread = "No unread messages"
end
+ @shell.say_status :recording, "channel #{ch['id']}", :green
+ Databases.add_channel_object(ch)
bucket << chan.new(ch['id'], ch['counts']['messages'], ch['counts']['subscribers'], ch['type'], ch['owner'], ch['annotations'], ch['readers'], ch['editors'], writers, ch['you_subscribed'], unread, ch['recent_message_id'], ch['recent_message'])
end
puts "\e[H\e[2J"
bucket
end