From cd85857a1f44d896f0a159f8d70884eb29b540cd Mon Sep 17 00:00:00 2001 From: V V Date: Thu, 1 Oct 2015 20:39:29 +0300 Subject: [PATCH] small fixes --- interface.c | 6 ++++++ json-tg.c | 2 ++ lua-tg.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/interface.c b/interface.c index f330eb2..f052f4a 100644 --- a/interface.c +++ b/interface.c @@ -1329,6 +1329,10 @@ void do_ ## act ## _ ## tp (struct command *command, int arg_num, struct arg arg tgl_do_load_photo (TLS, M->media.photo, actf, ev);\ } else if (M->media.type == tgl_message_media_document) {\ tgl_do_load_document (TLS, M->media.document, actf, ev);\ + } else if (M->media.type == tgl_message_media_video) {\ + tgl_do_load_video (TLS, M->media.document, actf, ev);\ + } else if (M->media.type == tgl_message_media_audio) {\ + tgl_do_load_audio (TLS, M->media.document, actf, ev);\ } else if (M->media.type == tgl_message_media_document_encr) {\ tgl_do_load_encr_document (TLS, M->media.encr_document, actf, ev); \ } else if (M->media.type == tgl_message_media_webpage) {\ @@ -3551,6 +3555,8 @@ void print_media (struct in_ev *ev, struct tgl_message_media *M) { } return; case tgl_message_media_document: + case tgl_message_media_audio: + case tgl_message_media_video: mprintf (ev, "["); assert (M->document); if (M->document->flags & TGLDF_IMAGE) { diff --git a/json-tg.c b/json-tg.c index 37d342e..cd14f11 100644 --- a/json-tg.c +++ b/json-tg.c @@ -216,6 +216,8 @@ json_t *json_pack_media (struct tgl_message_media *M) { } break; case tgl_message_media_document: + case tgl_message_media_audio: + case tgl_message_media_video: case tgl_message_media_document_encr: assert (json_object_set (res, "type", json_string ("document")) >= 0); break; diff --git a/lua-tg.c b/lua-tg.c index ca6f47f..0dc0e18 100644 --- a/lua-tg.c +++ b/lua-tg.c @@ -284,6 +284,8 @@ void push_media (struct tgl_message_media *M) { lua_add_string_field ("caption", M->caption); break; case tgl_message_media_document: + case tgl_message_media_audio: + case tgl_message_media_video: case tgl_message_media_document_encr: lua_newtable (luaState); lua_add_string_field ("type", "document");