aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter.c
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-04-01 19:13:32 +0200
committerMarius Halden <marius.h@lden.org>2017-04-01 19:35:31 +0200
commitfebcb6dca01bb17e0197770a0e6596aaa98bcdbd (patch)
tree22d9a0f422c3f2f625b2a2ff7492b68a15f58d1a /protocols/twitter/twitter.c
parent395b95a7d6df6c857e543fad47124cddda6d21d5 (diff)
Use auto_populate_reply_metadata for twitter reply
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r--protocols/twitter/twitter.c8
1 files changed, 7 insertions, 1 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]) {