From 61d0d4b5fcfaaf46e64cc6756dabc16fe1a3158c Mon Sep 17 00:00:00 2001
From: anekos
Date: Sun, 30 Oct 2011 01:43:27 +0900
Subject: エラーになったときは、とりあえずそこまでのを表示する
---
twittperator.js | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'twittperator.js')
diff --git a/twittperator.js b/twittperator.js
index 7407705..40bf585 100644
--- a/twittperator.js
+++ b/twittperator.js
@@ -28,7 +28,7 @@ let PLUGIN_INFO =
Twittperator
Twitter Client using OAuth and Streaming API
OAuth/StreamingAPI対応Twitterクライアント
- 1.16.1
+ 1.16.2
2.3
teramako
anekos
@@ -2214,18 +2214,23 @@ let PLUGIN_INFO =
command: ["thread"],
description: "Show tweets thread.",
action: function(arg) {
+ function showThread () {
+ Twittperator.showTL(thread);
+ }
function getStatus(id, next) {
let result;
- if (history.some(function (it) (it.id == id && (result = it))))
+ if (history.some(function (it) (it.id == id && (result = it)))) {
return next(result);
- tw.jsonGet("statuses/show/" + id, null, function(res) next(res))
+ }
+ // XXX エラーの時はなにか表示しておくべき?
+ tw.jsonGet("statuses/show/" + id, null, function(res) next(res), showThread);
}
function trace(st) {
thread.push(st);
if (st.in_reply_to_status_id) {
getStatus(st.in_reply_to_status_id, trace);
} else {
- Twittperator.showTL(thread);
+ showThread();
}
}
--
cgit v1.2.3