diff options
author | Trumeet <yuuta@yuuta.moe> | 2021-09-01 17:48:16 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2021-09-01 17:48:16 -0700 |
commit | 94d16a76d9b710fc88231ef89439d2db4821265b (patch) | |
tree | db1bebc990dbf1a93ea3c179156b5de6df442b9f | |
parent | 80307aaa0bddce011bde1bb73f48a6006be7131c (diff) | |
download | minebridge-94d16a76d9b710fc88231ef89439d2db4821265b.tar minebridge-94d16a76d9b710fc88231ef89439d2db4821265b.tar.gz minebridge-94d16a76d9b710fc88231ef89439d2db4821265b.tar.bz2 minebridge-94d16a76d9b710fc88231ef89439d2db4821265b.zip |
feat: remove [t.me] links
-rw-r--r-- | main.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -69,7 +69,6 @@ void *main_tg2mc(void *e) char msg[4097]; char name[1024]; char username[512]; - char url[512]; char uid[32]; int32_t max_upd_id = 0; run: @@ -192,22 +191,6 @@ run: json_object *obj2 = json_object_new_object(); json_object_array_add(req_root, obj2); json_object_object_add(obj2, "text", json_object_new_string(msg)); - json_object *obj3 = json_object_new_object(); - json_object_array_add(req_root, obj3); - json_object_object_add(obj3, "text", json_object_new_string("[t.me]")); - json_object_object_add(obj3, "underlined", json_object_new_boolean(1)); - json_object_object_add(obj3, "color", json_object_new_string("dark_aqua")); - json_object *obj3_click_event = json_object_new_object(); - json_object_object_add(obj3, "clickEvent", obj3_click_event); - json_object_object_add(obj3_click_event, "action", json_object_new_string("open_url")); - sprintf(url, env->tg_link_fmt, tgmsg->message_id); - json_object_object_add(obj3_click_event, "value", json_object_new_string(url)); - json_object *obj3_hover_event = json_object_new_object(); - json_object_object_add(obj3, "hoverEvent", obj3_hover_event); - json_object_object_add(obj3_hover_event, "action", json_object_new_string("show_text")); - json_object *obj3_hv_contents = json_object_new_object(); - json_object_object_add(obj3_hover_event, "contents", obj3_hv_contents); - json_object_object_add(obj3_hv_contents, "text", json_object_new_string("View in Telegram")); const char *json = json_object_to_json_string(req_root); cmd = calloc(strlen(json) + 11 /* "tellraw @a " */ + 1, sizeof(char)); sprintf(cmd, "tellraw @a %s", json); |