diff options
-rw-r--r-- | ebooks.cpp | 4 | ||||
m--------- | vendor/libtwittercpp | 0 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ebooks.cpp b/ebooks.cpp index c01cdc9..8b567ed 100644 --- a/ebooks.cpp +++ b/ebooks.cpp | |||
@@ -79,7 +79,7 @@ int main(int argc, char** args) | |||
79 | client.setUserStreamNotifyCallback([&] (twitter::notification n) { | 79 | client.setUserStreamNotifyCallback([&] (twitter::notification n) { |
80 | if (n.getType() == twitter::notification::type::tweet) | 80 | if (n.getType() == twitter::notification::type::tweet) |
81 | { | 81 | { |
82 | if (!n.getTweet().isRetweet()) | 82 | if ((!n.getTweet().isRetweet()) && (n.getTweet().getAuthor() != client.getUser())) |
83 | { | 83 | { |
84 | std::string original = n.getTweet().getText(); | 84 | std::string original = n.getTweet().getText(); |
85 | std::string canonical; | 85 | std::string canonical; |
@@ -89,7 +89,7 @@ int main(int argc, char** args) | |||
89 | 89 | ||
90 | if (canonical.find("@rawr_ebooks") != std::string::npos) | 90 | if (canonical.find("@rawr_ebooks") != std::string::npos) |
91 | { | 91 | { |
92 | std::string doc = "@" + n.getTweet().getAuthor().getScreenName() + " "; | 92 | std::string doc = client.generateReplyPrefill(n.getTweet()); |
93 | { | 93 | { |
94 | std::lock_guard<std::mutex> stats_lock(stats_mutex); | 94 | std::lock_guard<std::mutex> stats_lock(stats_mutex); |
95 | doc += kgramstats.randomSentence(140 - doc.length()); | 95 | doc += kgramstats.randomSentence(140 - doc.length()); |
diff --git a/vendor/libtwittercpp b/vendor/libtwittercpp | |||
Subproject cdea9154ff180e95dfbdd8e0647922ca8afa3d4 | Subproject 62f6aae6c313b2a2a493c5147ec831a66eba01f | ||