Commit d7f9fcc6 authored by vvaltman's avatar vvaltman

Fixed lua media types

parent 7d7a40a8
...@@ -237,19 +237,23 @@ void push_media (struct tgl_message_media *M) { ...@@ -237,19 +237,23 @@ void push_media (struct tgl_message_media *M) {
switch (M->type) { switch (M->type) {
case tgl_message_media_photo: case tgl_message_media_photo:
case tgl_message_media_photo_encr: case tgl_message_media_photo_encr:
lua_pushstring (luaState, "photo"); lua_newtable (luaState);
lua_add_string_field ("type", "photo");
break; break;
case tgl_message_media_video: case tgl_message_media_video:
case tgl_message_media_video_encr: case tgl_message_media_video_encr:
lua_pushstring (luaState, "video"); lua_newtable (luaState);
lua_add_string_field ("type", "video");
break; break;
case tgl_message_media_audio: case tgl_message_media_audio:
case tgl_message_media_audio_encr: case tgl_message_media_audio_encr:
lua_pushstring (luaState, "audio"); lua_newtable (luaState);
lua_add_string_field ("type", "audio");
break; break;
case tgl_message_media_document: case tgl_message_media_document:
case tgl_message_media_document_encr: case tgl_message_media_document_encr:
lua_pushstring (luaState, "document"); lua_newtable (luaState);
lua_add_string_field ("type", "document");
break; break;
case tgl_message_media_unsupported: case tgl_message_media_unsupported:
lua_pushstring (luaState, "unsupported"); lua_pushstring (luaState, "unsupported");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment