Mercurial > pidgin-twitter
comparison util.c @ 332:227852ee649c
do not append "in_reply_to_status_id" when msdid is 0.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 13 Oct 2009 03:10:32 +0900 |
parents | b4c846870b3c |
children | 9f78fb6bfc76 |
comparison
equal
deleted
inserted
replaced
331:b4c846870b3c | 332:227852ee649c |
---|---|
523 gchar * | 523 gchar * |
524 twitter_make_link_string(gchar **str) | 524 twitter_make_link_string(gchar **str) |
525 { | 525 { |
526 GMatchInfo *match_info = NULL; | 526 GMatchInfo *match_info = NULL; |
527 gchar *boddy0 = NULL, *boddy = NULL; | 527 gchar *boddy0 = NULL, *boddy = NULL; |
528 gchar *newstr = NULL, *match = NULL; | 528 gchar *newstr = NULL, *linkstr = NULL; |
529 gchar *linkstr = NULL; | 529 gchar *match = NULL; |
530 gchar *user = NULL; | 530 gchar *idstr = NULL, *user = NULL; |
531 | 531 |
532 twitter_debug("called\n"); | 532 twitter_debug("called\n"); |
533 | 533 |
534 /* buffer without ptmsgid=123 */ | 534 /* buffer without ptmsgid=123 */ |
535 boddy0 = g_regex_replace(regp[SENDER], *str, -1, 0, "", 0, NULL); | 535 boddy0 = g_regex_replace(regp[SENDER], *str, -1, 0, "", 0, NULL); |
553 | 553 |
554 /* link string */ | 554 /* link string */ |
555 g_regex_match(regp[MESSAGE_ID], *str, 0, &match_info); | 555 g_regex_match(regp[MESSAGE_ID], *str, 0, &match_info); |
556 if(match_info) { | 556 if(match_info) { |
557 match = g_match_info_fetch(match_info, 1); | 557 match = g_match_info_fetch(match_info, 1); |
558 idstr = match ? match : "0"; | |
558 linkstr = g_strdup_printf(LINK_FORMAT_TWITTER, | 559 linkstr = g_strdup_printf(LINK_FORMAT_TWITTER, |
559 match, user, /* Reply */ | 560 idstr, user, /* Reply */ |
560 match, /* Favorite */ | 561 idstr, /* Favorite */ |
561 match, user, boddy); /* Retweet */ | 562 idstr, user, boddy); /* Retweet */ |
562 | 563 |
563 twitter_debug("linkstr = %s\n", linkstr); | 564 twitter_debug("linkstr = %s\n", linkstr); |
564 | 565 |
565 newstr = g_regex_replace(regp[MESSAGE_ID], *str, -1, 0, | 566 newstr = g_regex_replace(regp[MESSAGE_ID], *str, -1, 0, |
566 "", | 567 "", |