aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/twitter/twitter.c8
-rw-r--r--protocols/twitter/twitter_lib.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index 9d3b743c..623d5e6c 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -613,6 +613,8 @@ static void twitter_init(account_t * acc)
s = set_add(&acc->set, "channel_name", NULL, set_eval_channel_name, acc);
s->flags |= ACC_SET_OFFLINE_ONLY;
+ s = set_add(&acc->set, "autofill_reply", "true", set_eval_bool, acc);
+
s = set_add(&acc->set, "_last_tweet", "0", NULL, acc);
s->flags |= SET_HIDDEN | SET_NOSAVE;
@@ -1058,7 +1060,11 @@ static void twitter_handle_command(struct im_connection *ic, char *message)
"post any statuses recently", cmd[1]);
goto eof;
}
- message = new = g_strdup_printf("@%s %s", bu->handle, cmd[2]);
+ if (!set_getbool(&ic->acc->set, "autofill_reply")) {
+ message = new = g_strdup_printf("@%s %s", bu->handle, cmd[2]);
+ } else {
+ message = cmd[2];
+ }
in_reply_to = id;
allow_post = TRUE;
} else if (g_strcasecmp(cmd[0], "rawreply") == 0 && cmd[1] && cmd[2]) {
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 303523b2..6b2461fe 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -1745,14 +1745,16 @@ static void twitter_http_post(struct http_request *req)
*/
void twitter_post_status(struct im_connection *ic, char *msg, guint64 in_reply_to)
{
- char *args[4] = {
+ char *args[6] = {
"status", msg,
"in_reply_to_status_id",
- g_strdup_printf("%" G_GUINT64_FORMAT, in_reply_to)
+ g_strdup_printf("%" G_GUINT64_FORMAT, in_reply_to),
+ "auto_populate_reply_metadata",
+ "true",
};
twitter_http(ic, TWITTER_STATUS_UPDATE_URL, twitter_http_post, ic, 1,
- args, in_reply_to ? 4 : 2);
+ args, in_reply_to ? (set_getbool(&ic->acc->set, "autofill_reply") ? 6 : 4) : 2);
g_free(args[3]);
}