diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index bae563f..617af62 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
@@ -420,6 +420,22 @@ namespace twitter { | |||
420 | _user_stream.stop(); | 420 | _user_stream.stop(); |
421 | } | 421 | } |
422 | 422 | ||
423 | std::string client::generateReplyPrefill(tweet _tweet) const | ||
424 | { | ||
425 | std::ostringstream output; | ||
426 | output << "@" << _tweet.getAuthor().getScreenName() << " "; | ||
427 | |||
428 | for (auto mention : _tweet.getMentions()) | ||
429 | { | ||
430 | if ((mention.first != _tweet.getAuthor().getID()) && (mention.first != _current_user.getID())) | ||
431 | { | ||
432 | output << "@" << mention.second << " "; | ||
433 | } | ||
434 | } | ||
435 | |||
436 | return output.str(); | ||
437 | } | ||
438 | |||
423 | bool client::performGet(std::string url, long& response_code, std::string& result) | 439 | bool client::performGet(std::string url, long& response_code, std::string& result) |
424 | { | 440 | { |
425 | std::ostringstream output; | 441 | std::ostringstream output; |