From 4fb18bfbe442001849fc36ba496132a47c766730 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Sun, 29 May 2016 20:01:43 +0200 Subject: Add 'quote' command for twitter --- protocols/twitter/twitter.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'protocols/twitter/twitter.c') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 5f6156a6..9017d3b3 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -1060,7 +1060,18 @@ static void twitter_handle_command(struct im_connection *ic, char *message) twitter_status_show_url(ic, id); } goto eof; + } else if (g_strcasecmp(cmd[0], "quote") == 0 && cmd[1]) { + id = twitter_message_id_from_command_arg(ic, cmd[1], NULL); + td->last_status_id = 0; + if (id) { + twitter_status_quote_post(ic, id, cmd[2]); + } else { + twitter_log(ic, "User '%s' does not exist or didn't " + "post any statuses recently", cmd[1]); + } + + goto eof; } else if (g_strcasecmp(cmd[0], "post") == 0) { message += 5; allow_post = TRUE; -- cgit v1.2.3