diff pidgin-twitter.h @ 347:33d2551727ba

embed "in reply to foo" link to each reply message
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 14 Dec 2009 20:14:31 +0900
parents 2e37e715e4a6
children 20fe2a2b677e
line wrap: on
line diff
--- a/pidgin-twitter.h	Mon Dec 14 15:07:52 2009 +0900
+++ b/pidgin-twitter.h	Mon Dec 14 20:14:31 2009 +0900
@@ -51,7 +51,7 @@
     SIZE_128_WASSR,
     EXCESS_LF,
     TRAIL_HASH,
-    MESSAGE_ID
+    PTTAG_TWITTER
 };
 
 /* service id */
@@ -95,6 +95,8 @@
     gchar *profile_image_url;
     time_t time;
     guint64 id;
+    guint64 in_reply_to_status_id;
+    gchar *in_reply_to_screen_name;
 } status_t;
 
 typedef struct _source {
@@ -173,6 +175,8 @@
 #define TAG_FORMAT_IDENTICA     "#<a href='http://identi.ca/tag/%s'>%s</a>"
 #define GROUP_FORMAT_IDENTICA   "!<a href='http://identi.ca/group/%s'>%s</a>"
 #define LINK_FORMAT_TWITTER     " <a href='PT://reply-twitter/?id=%s&user=%s'>RE</a> <a href='PT://fav-twitter/?id=%s'>FV</a> <a href='PT://retweet-twitter/?id=%s'>RT</a> <a href='PT://quotetweet-twitter/?id=%s&user=%s&msg=%s'>QT</a>"
+#define IN_REPLY_TO_FORMAT_TWITTER  " <a href='http://twitter.com/%s/status/%llu'>in reply to %s</al>"
+
 
 #define DEFAULT_LIST            "(list of users: separated with ' ,:;')"
 #define OOPS_MESSAGE            "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>"
@@ -197,7 +201,8 @@
 #define P_SIZE_128_WASSR    "\\.128\\."
 #define P_EXCESS_LF         "([\\r|\\n]{2,})"
 #define P_TRAIL_HASH        "( #\\s+$)"
-#define P_MESSAGE_ID        " ptmsgid=([0-9]+)$"
+/* pttag=msgid:in_reply_to_status_id:in_reply_to_screen_name */
+#define P_PTTAG_TWITTER     " pttag=([0-9]+):([0-9]+):([-A-Za-z0-9_]*)$"
 
 /* twitter API specific macros */
 #define TWITTER_BASE_URL "http://twitter.com"