Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
886cc484
Commit
886cc484
authored
Jan 12, 2015
by
vysheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #387 from asdofindia/lua_send_typing
add send_typing and send_typing_abort to lua
parents
723416d3
b77c3566
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
README-LUA
README-LUA
+3
-0
lua-tg.c
lua-tg.c
+12
-0
No files found.
README-LUA
View file @
886cc484
...
...
@@ -31,6 +31,9 @@ Function_list (arguments are listed aside from cb_function and cb_extra, :
rename_chat (chat, new_name)
chat_set_photo (chat, file)
send_typing (peer)
send_typing_abort (peer)
send_msg (peer, text)
fwd_msg (peer, msg)
...
...
lua-tg.c
View file @
886cc484
...
...
@@ -464,6 +464,8 @@ enum lua_query_type {
lq_contact_list
,
lq_dialog_list
,
lq_msg
,
lq_send_typing
,
lq_send_typing_abort
,
lq_rename_chat
,
lq_send_photo
,
lq_chat_set_photo
,
...
...
@@ -878,6 +880,14 @@ void lua_do_all (void) {
free
(
lua_ptr
[
p
+
2
]);
p
+=
3
;
break
;
case
lq_send_typing
:
tgl_do_send_typing
(
TLS
,
((
tgl_peer_t
*
)
lua_ptr
[
p
+
1
])
->
id
,
tgl_typing_typing
,
lua_empty_cb
,
lua_ptr
[
p
]);
p
+=
2
;
break
;
case
lq_send_typing_abort
:
tgl_do_send_typing
(
TLS
,
((
tgl_peer_t
*
)
lua_ptr
[
p
+
1
])
->
id
,
tgl_typing_cancel
,
lua_empty_cb
,
lua_ptr
[
p
]);
p
+=
2
;
break
;
case
lq_rename_chat
:
tgl_do_rename_chat
(
TLS
,
((
tgl_peer_t
*
)
lua_ptr
[
p
+
1
])
->
id
,
lua_ptr
[
p
+
2
],
lua_msg_cb
,
lua_ptr
[
p
]);
free
(
lua_ptr
[
p
+
2
]);
...
...
@@ -1131,6 +1141,8 @@ struct lua_function functions[] = {
{
"get_dialog_list"
,
lq_dialog_list
,
{
lfp_none
}},
{
"rename_chat"
,
lq_rename_chat
,
{
lfp_chat
,
lfp_string
,
lfp_none
}},
{
"send_msg"
,
lq_msg
,
{
lfp_peer
,
lfp_string
,
lfp_none
}},
{
"send_typing"
,
lq_send_typing
,
{
lfp_peer
,
lfp_none
}},
{
"send_typing_abort"
,
lq_send_typing_abort
,
{
lfp_peer
,
lfp_none
}},
{
"send_photo"
,
lq_send_photo
,
{
lfp_peer
,
lfp_string
,
lfp_none
}},
{
"send_video"
,
lq_send_video
,
{
lfp_peer
,
lfp_string
,
lfp_none
}},
{
"send_audio"
,
lq_send_audio
,
{
lfp_peer
,
lfp_string
,
lfp_none
}},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment