aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-04-25 11:57:19 +0200
committerMarius Halden <marius.h@lden.org>2017-04-25 11:57:19 +0200
commit64f4d843217aed18605284f8c4ebba93724e5a63 (patch)
treeb4726342c910029796af57f9fd9da155c131e178 /protocols
parentdd46ae5bef1c34773a3e7d3e2ef48fc013cef283 (diff)
parent55bc71e550bc798a8edf968474e4642c3f79ba63 (diff)
Merge branch 'master' into patched-master
Diffstat (limited to 'protocols')
-rw-r--r--protocols/twitter/twitter.c3
-rw-r--r--protocols/twitter/twitter_lib.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index 623d5e6c..b0ab98c4 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -618,6 +618,9 @@ static void twitter_init(account_t * acc)
s = set_add(&acc->set, "_last_tweet", "0", NULL, acc);
s->flags |= SET_HIDDEN | SET_NOSAVE;
+ s = set_add(&acc->set, "in_korea", "false", set_eval_bool, acc);
+ s->flags |= SET_HIDDEN;
+
if (strcmp(acc->prpl->name, "twitter") == 0) {
s = set_add(&acc->set, "stream", "true", set_eval_bool, acc);
s->flags |= ACC_SET_OFFLINE_ONLY;
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 6b2461fe..a046f35e 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -1753,6 +1753,13 @@ void twitter_post_status(struct im_connection *ic, char *msg, guint64 in_reply_t
"true",
};
+ if (set_getbool(&ic->acc->set, "in_korea") && !in_reply_to) {
+ g_free(args[3]);
+ args[2] = "place_id";
+ args[3] = g_strdup("c999e6a453e9ef72");
+ in_reply_to = 1;
+ }
+
twitter_http(ic, TWITTER_STATUS_UPDATE_URL, twitter_http_post, ic, 1,
args, in_reply_to ? (set_getbool(&ic->acc->set, "autofill_reply") ? 6 : 4) : 2);
g_free(args[3]);