Fixed lua media types
This commit is contained in:
parent
7d7a40a8b6
commit
d7f9fcc614
12
lua-tg.c
12
lua-tg.c
@ -237,19 +237,23 @@ void push_media (struct tgl_message_media *M) {
|
||||
switch (M->type) {
|
||||
case tgl_message_media_photo:
|
||||
case tgl_message_media_photo_encr:
|
||||
lua_pushstring (luaState, "photo");
|
||||
lua_newtable (luaState);
|
||||
lua_add_string_field ("type", "photo");
|
||||
break;
|
||||
case tgl_message_media_video:
|
||||
case tgl_message_media_video_encr:
|
||||
lua_pushstring (luaState, "video");
|
||||
lua_newtable (luaState);
|
||||
lua_add_string_field ("type", "video");
|
||||
break;
|
||||
case tgl_message_media_audio:
|
||||
case tgl_message_media_audio_encr:
|
||||
lua_pushstring (luaState, "audio");
|
||||
lua_newtable (luaState);
|
||||
lua_add_string_field ("type", "audio");
|
||||
break;
|
||||
case tgl_message_media_document:
|
||||
case tgl_message_media_document_encr:
|
||||
lua_pushstring (luaState, "document");
|
||||
lua_newtable (luaState);
|
||||
lua_add_string_field ("type", "document");
|
||||
break;
|
||||
case tgl_message_media_unsupported:
|
||||
lua_pushstring (luaState, "unsupported");
|
||||
|
Loading…
Reference in New Issue
Block a user