Skip to content

Commit

Permalink
Add Talk All Text Retweet. fixes #237 @3h
Browse files Browse the repository at this point in the history
  • Loading branch information
みぞ@CrazyBeatCoder committed Nov 24, 2017
1 parent 79a6e36 commit 3c5e61d
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -39,10 +39,16 @@ public void onStatus(final Status status) {
}

final StringBuffer buffer = new StringBuffer();
buffer.append(status.getUser().getName());
buffer.append("さんから、");
buffer.append(status.getText());
System.out.println(buffer);

if (status.isRetweet()) {
Status retweetedStatus = status.getRetweetedStatus();
buffer.append(status.getUser().getName() + "さんがリツイート。");
buffer.append(retweetedStatus.getUser().getName() + "さんから、");
buffer.append(retweetedStatus.getText());
} else {
buffer.append(status.getUser().getName() + "さんから、");
buffer.append(status.getText());
}

mTalker.talkAsync(UrlUtil.convURLEmpty(buffer).replaceAll("\n", "。"), mYukkuriVoice);

Expand Down

0 comments on commit 3c5e61d

Please sign in to comment.