[smuxi] Engine-Twitter, lib/Twitterizer: show text of quoted tweets
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi] Engine-Twitter, lib/Twitterizer: show text of quoted tweets
- Date: Thu, 22 Oct 2015 10:30:44 +0000 (UTC)
commit 2528dea434bba8799b91b761e0c3688901e66d29
Author: Mirco Bauer <meebey meebey net>
Date: Thu Oct 22 12:23:38 2015 +0200
Engine-Twitter, lib/Twitterizer: show text of quoted tweets
lib/Twitterizer | 2 +-
.../Protocols/Twitter/TwitterMessageBuilder.cs | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/lib/Twitterizer b/lib/Twitterizer
index 3df8c63..fe157d6 160000
--- a/lib/Twitterizer
+++ b/lib/Twitterizer
@@ -1 +1 @@
-Subproject commit 3df8c63e593dcbaa48c0cc23bffb3dbc1d91394a
+Subproject commit fe157d682f827e93b4e5926316da1382f43d26e6
diff --git a/src/Engine-Twitter/Protocols/Twitter/TwitterMessageBuilder.cs
b/src/Engine-Twitter/Protocols/Twitter/TwitterMessageBuilder.cs
index c2e8dc7..6ef6079 100644
--- a/src/Engine-Twitter/Protocols/Twitter/TwitterMessageBuilder.cs
+++ b/src/Engine-Twitter/Protocols/Twitter/TwitterMessageBuilder.cs
@@ -42,18 +42,26 @@ namespace Smuxi.Engine
TimeStamp = status.CreatedDate.ToUniversalTime();
AppendSenderPrefix(sender, isHighlight);
- // LAME: Twitter lies in the truncated field and says it's not
- // truncated while it is, thus always use retweet_status if
- // available
+ if (status.RetweetedStatus == null && status.QuotedStatus == null) {
+ AppendMessage(status.Text);
+ }
if (status.RetweetedStatus != null) {
- var text = String.Format(
+ var rtMsg = String.Format(
"RT @{0}: {1}",
status.RetweetedStatus.User.ScreenName,
status.RetweetedStatus.Text
);
- AppendMessage(text);
- } else {
+ AppendMessage(rtMsg);
+ }
+ if (status.QuotedStatus != null) {
+ var qtMsg = String.Format(
+ "QT @{0}: {1}",
+ status.QuotedStatus.User.ScreenName,
+ status.QuotedStatus.Text
+ );
AppendMessage(status.Text);
+ AppendSpace();
+ AppendMessage(qtMsg);
}
return this;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]