From 94f613581320f660204bf967aafd74e6450b1389 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 1 Aug 2016 12:44:47 +0200 Subject: Add dm command --- protocols/twitter/twitter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'protocols/twitter/twitter.c') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 0c075c77..0d635b21 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -1089,6 +1089,13 @@ static void twitter_handle_command(struct im_connection *ic, char *message) } else if (g_strcasecmp(cmd[0], "post") == 0) { message += 5; allow_post = TRUE; + } else if (g_strcasecmp(cmd[0], "dm") == 0 && cmd[1] && cmd[2]) { + if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1]))) { + twitter_direct_messages_new(ic, bu->handle, cmd[2]); + } else { + twitter_direct_messages_new(ic, cmd[1], cmd[2]); + } + goto eof; } if (allow_post) { -- cgit v1.2.3