Commit b36e59d1 authored by Vysheng's avatar Vysheng

Fixed geo in lua

parent 04630cb0
...@@ -261,15 +261,18 @@ void push_media (struct tgl_message_media *M) { ...@@ -261,15 +261,18 @@ void push_media (struct tgl_message_media *M) {
lua_add_string_field ("type", "document"); lua_add_string_field ("type", "document");
break; break;
case tgl_message_media_unsupported: case tgl_message_media_unsupported:
lua_pushstring (luaState, "unsupported"); lua_newtable (luaState);
lua_add_string_field ("type", "unsupported");
break; break;
case tgl_message_media_geo: case tgl_message_media_geo:
lua_newtable (luaState); lua_newtable (luaState);
lua_add_string_field ("type", "geo");
lua_add_num_field ("longitude", M->geo.longitude); lua_add_num_field ("longitude", M->geo.longitude);
lua_add_num_field ("latitude", M->geo.latitude); lua_add_num_field ("latitude", M->geo.latitude);
break; break;
case tgl_message_media_contact: case tgl_message_media_contact:
lua_newtable (luaState); lua_newtable (luaState);
lua_add_string_field ("type", "contact");
lua_add_string_field ("phone", M->phone); lua_add_string_field ("phone", M->phone);
lua_add_string_field ("first_name", M->first_name); lua_add_string_field ("first_name", M->first_name);
lua_add_string_field ("last_name", M->last_name); lua_add_string_field ("last_name", M->last_name);
......
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